/**
 * 制作台 · UX3 创作地图 / 定律门 / 瘦壳 Lean（P-css-j：从 shell 切出）
 */

/* UX3 P1 · 个人/共享空间切换与侧栏双树 */
.igs-shell-space-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0 0.5rem 0 0.75rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: var(--igs-surface-2, rgba(0, 0, 0, 0.06));
  border: 1px solid var(--igs-border, rgba(0, 0, 0, 0.08));
}
.igs-shell-space-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--igs-muted, #666);
  white-space: nowrap;
}
.igs-shell-space-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}
@media (max-width: 720px) {
  body:not(.igs-ux2-desktop-first) .igs-shell-space-btn span {
    display: none;
  }
}
.igs-shell-space-btn.is-on {
  background: var(--igs-surface, #fff);
  color: var(--igs-accent, #2d6a4f);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.igs-shell-space-btn--pc {
  border: 1px solid color-mix(in srgb, #2a8f72 42%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, #2a8f72 16%, #fff), #fff);
  color: #1a5c48;
  font-weight: 700;
  margin-left: 0.2rem;
}
.igs-shell-space-btn--pc:hover {
  border-color: #2a8f72;
}
.igs-btn--cloud {
  background: linear-gradient(135deg, #2a8f72, #1f6b56) !important;
  border-color: #1f6b56 !important;
  color: #fff !important;
}
.igs-shell-drawer__space-hint {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--igs-border, rgba(0, 0, 0, 0.08));
}
.igs-shell-drawer__space-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(45, 106, 79, 0.12);
  color: var(--igs-accent, #2d6a4f);
  margin-bottom: 0.35rem;
}
.igs-shell-drawer__space-badge.is-shared {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}
.igs-shell-drawer__path {
  word-break: break-all;
  font-size: 0.68rem;
}
.igs-shell-drawer__item--switch {
  color: var(--igs-accent, #2d6a4f);
  font-weight: 500;
}
.igs-shell-drawer__item--import {
  margin-top: 0.35rem;
  width: 100%;
  text-align: left;
  border: 1px dashed var(--igs-accent, #2d6a4f);
}
.igs-shell-shared-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.igs-shell-shared-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--igs-border, rgba(0, 0, 0, 0.06));
}
.igs-shell-shared-item:last-child {
  border-bottom: none;
}
.igs-shell-drawer__shelf--shared {
  max-height: 22rem;
  margin-top: 0.45rem;
}
.igs-shell-drawer__shared-card {
  gap: 0.28rem;
}
.igs-shell-drawer__shared-card .igs-shell-drawer__item--import {
  margin-top: 0.25rem;
  width: 100%;
  justify-content: center;
}
.igs-shell-drawer__shared-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
  align-items: center;
}
.igs-shell-drawer__shared-acts .igs-shell-drawer__item--primary {
  flex: 1 1 auto;
  min-width: 5.5rem;
}
.igs-shell-drawer__shared-acts .igs-btn-ghost {
  flex: 0 0 auto;
}
.igs-shell-drawer__shared-card.is-on {
  outline: 2px solid color-mix(in srgb, var(--igs-accent) 55%, transparent);
}
.igs-shell-drawer__shared-desc {
  font-size: 0.7rem !important;
  line-height: 1.35;
  color: var(--igs-ink-muted, #556) !important;
}
.igs-shell-drawer__shared-card.is-revoked {
  opacity: 0.55;
}
body.igs-space-shared .igs-shell-drawer {
  border-right-color: rgba(37, 99, 235, 0.2);
}
@media (max-width: 720px) {
  body:not(.igs-ux2-desktop-first) .igs-shell-space-switch {
    display: none;
  }
}

/* UX3 P2 · 五层创作地图与定律进度环 */
.igs-ux3-map {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--igs-line, rgba(0, 0, 0, 0.08));
  background: var(--igs-surface-2, rgba(0, 0, 0, 0.02));
}
.igs-ux3-map.is-compact {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
}
.igs-ux3-map__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.igs-ux3-map__head h3 {
  margin: 0;
  font-size: 1rem;
}
.igs-ux3-map__shared {
  text-align: right;
  flex-shrink: 0;
}
.igs-ux3-map__track {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
}
.igs-ux3-map__layer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 4.25rem;
  padding: 0.35rem 0.25rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.igs-ux3-map__layer:hover .igs-ux3-map__ring {
  transform: scale(1.04);
}
.igs-ux3-map__layer.is-done .igs-ux3-map__ring {
  border-color: var(--igs-accent, #2d6a4f);
  color: var(--igs-accent, #2d6a4f);
}
.igs-ux3-map__layer.is-active .igs-ux3-map__ring {
  border-color: #d4a017;
  color: #b8860b;
}
.igs-ux3-map__layer.is-todo .igs-ux3-map__ring {
  opacity: 0.55;
}
.igs-ux3-map__ring {
  --map-pct: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 3px solid var(--igs-line, #ccc);
  background: conic-gradient(
    var(--igs-accent, #2d6a4f) calc(var(--map-pct) * 1%),
    transparent 0
  );
  transition: transform 0.15s ease;
}
.igs-ux3-map__ring b {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--igs-surface, #fff);
}
.igs-ux3-map__lab {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}
.igs-ux3-map__arrow {
  color: var(--igs-muted, #888);
  font-size: 0.85rem;
  padding: 0 0.1rem;
  user-select: none;
}
.igs-ux3-law {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--igs-line, rgba(0, 0, 0, 0.1));
}
.igs-ux3-law__ring {
  --law-pct: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.5rem;
}
.igs-ux3-law__ring-val {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 3px solid var(--igs-line, #ccc);
  background: conic-gradient(#2563eb calc(var(--law-pct) * 1%), transparent 0);
  box-shadow: inset 0 0 0 2px var(--igs-surface, #fff);
}
.igs-ux3-law__ring-lab {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--igs-muted, #666);
}
.igs-ux3-law__pending {
  flex: 1 1 100%;
  margin: 0;
}
@media (max-width: 640px) {
  body:not(.igs-ux2-desktop-first) .igs-ux3-map__track {
    justify-content: space-between;
  }
  body:not(.igs-ux2-desktop-first) .igs-ux3-map__arrow {
    display: none;
  }
  body:not(.igs-ux2-desktop-first) .igs-ux3-map__layer {
    min-width: 3.5rem;
  }
}

/* UX3 P3 · 定律门禁条 + 大纲包面板 */
.igs-ux3-law-gate-host {
  padding: 0 0.75rem;
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
}
body.igs-ux2-desktop-first .igs-shell-on .igs-ux3-law-gate-host {
  padding: 0 var(--igs-shell-stage-pad-x);
}
.igs-ux3-law-gate {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: rgba(254, 226, 226, 0.45);
  color: #991b1b;
  font-size: 0.82rem;
}
.igs-ux3-law-gate__toggle {
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  margin-top: 0.05rem;
  border: 1px solid color-mix(in srgb, #991b1b 28%, transparent);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.55);
  color: #991b1b;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.igs-ux3-law-gate__toggle:hover {
  background: rgba(255, 255, 255, 0.9);
}
.igs-ux3-law-gate__copy {
  flex: 1 1 auto;
  min-width: 0;
}
.igs-ux3-law-gate__summary {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.igs-ux3-law-gate:not(.is-collapsed) .igs-ux3-law-gate__summary {
  display: none;
}
.igs-ux3-law-gate.is-collapsed {
  align-items: center;
  margin: 0.28rem 0 0.4rem;
  padding: 0.28rem 0.55rem;
  gap: 0.4rem;
}
.igs-ux3-law-gate.is-collapsed .igs-ux3-law-gate__toggle {
  margin-top: 0;
  width: 1.45rem;
  height: 1.45rem;
}
.igs-ux3-law-gate.is-collapsed .igs-ux3-law-gate__list {
  display: none;
}
.igs-ux3-law-gate.is-collapsed .igs-ux3-law-gate__copy strong {
  display: inline;
  margin-right: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.igs-ux3-law-gate.is-collapsed .igs-ux3-law-gate__summary {
  display: inline;
  margin: 0;
  max-width: min(52vw, 36rem);
  vertical-align: baseline;
}
.igs-ux3-law-gate.is-collapsed .igs-ux3-law-gate__acts .igs-btn-ghost:not([data-law-action="outline"]) {
  display: none;
}
.igs-ux3-law-gate.is-collapsed .igs-ux3-law-gate__acts .igs-btn-sm {
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  min-height: 1.55rem;
}
.igs-ux3-law-gate__list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}
.igs-ux3-law-gate__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* P28 · 创作态顶栏压缩：写作/编剧等少占垂直高度 */
body.igs-ux2-desktop-first.igs-chrome-create .igs-shell-station-nav {
  padding: 0.16rem 0.65rem 0.18rem;
  gap: 0.15rem;
}
body.igs-ux2-desktop-first.igs-chrome-create .igs-shell-station-btn {
  min-height: 1.85rem;
  padding: 0.2rem 0.65rem;
  gap: 0.25rem;
}
body.igs-ux2-desktop-first.igs-chrome-create .igs-shell-station-btn svg {
  width: 15px;
  height: 15px;
}
body.igs-ux2-desktop-first.igs-chrome-create .igs-shell-station-subnav {
  margin-top: 0.1rem;
  padding: 0.08rem 0 0;
  gap: 0.2rem;
}
body.igs-ux2-desktop-first.igs-chrome-create .igs-shell-station-subbtn {
  padding: 0.18rem 0.55rem;
  font-size: 0.7rem;
}
body.igs-ux2-desktop-first.igs-chrome-create .igs-shell-station-context {
  padding: 0.12rem 0.65rem 0.16rem;
  gap: 0.4rem;
  font-size: 0.72rem;
}
body.igs-ux2-desktop-first.igs-chrome-create .igs-shell-station-context__book em {
  display: none;
}
body.igs-ux2-desktop-first.igs-chrome-create .igs-shell-station-context__page {
  padding: 0.1rem 0.4rem;
}
body.igs-ux2-desktop-first.igs-chrome-create .igs-ux3-law-gate-host {
  padding-top: 0;
  padding-bottom: 0;
}

.igs-ux3-outline-panel {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--igs-line, rgba(0, 0, 0, 0.08));
  background: var(--igs-surface, #fff);
}
.igs-ux3-outline-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.igs-ux3-outline-panel__head h3 {
  margin: 0;
  font-size: 1rem;
}
.igs-ux3-outline-panel__pct {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--igs-accent, #2d6a4f);
}
.igs-ux3-outline-slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.35rem;
}
.igs-ux3-outline-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  background: var(--igs-surface-2, rgba(0, 0, 0, 0.03));
  font-size: 0.75rem;
}
.igs-ux3-outline-slot.is-ok {
  border: 1px solid rgba(45, 106, 79, 0.25);
}
.igs-ux3-outline-panel__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* P14 · 创作页间距 / AI 侧栏 token 与壳层对齐 */
@media (max-width: 1366px) {
  .igs-workspace.igs-shell-on {
    --igs-ws-rail: var(--igs-ws-rail-user, var(--igs-shell-rail-w-md));
    --igs-chat-side-w: var(--igs-chat-side-user, var(--igs-shell-rail-w-md));
  }
}
@media (max-width: 900px) {
  body:not(.igs-ux2-desktop-first) .igs-workspace.igs-shell-on {
    --igs-ws-rail: var(--igs-ws-rail-user, var(--igs-shell-rail-w-sm));
    --igs-chat-side-w: var(--igs-chat-side-user, var(--igs-shell-rail-w-sm));
  }
}
@media (min-width: 1280px) {
  body.igs-ux2-desktop-first .igs-workspace.igs-shell-on {
    --igs-ws-rail: var(--igs-ws-rail-user, var(--igs-shell-rail-w-md));
    --igs-chat-side-w: var(--igs-chat-side-user, var(--igs-shell-rail-w-md));
  }
}
.igs-shell-on #panel-overview.active > .igs-dash--fill,
.igs-shell-on #panel-overview.active > .igs-hub--fill,
.igs-shell-on .igs-ux2-continue {
  padding: var(--igs-shell-stage-pad-y) var(--igs-shell-stage-pad-x);
}
.igs-shell-on .igs-nv-ai-rail,
.igs-shell-on .igs-pl-ai-rail {
  border-color: var(--igs-line, rgba(0, 0, 0, 0.08));
  border-radius: 0.65rem;
}
.igs-shell-on .igs-nv-studio.is-ai-open .igs-nv-studio__body {
  grid-template-columns: minmax(0, 1fr) min(var(--igs-ws-rail, var(--igs-shell-rail-w)), var(--igs-chat-max-w, 66.666vw));
}
.igs-shell-on .igs-nv-studio.is-ai-open .igs-nv-studio__body.is-files-open {
  grid-template-columns: minmax(0, 1fr) var(--igs-nv-files-w, 14rem) min(var(--igs-ws-rail, var(--igs-shell-rail-w)), var(--igs-chat-max-w, 66.666vw));
}
.igs-shell-on .igs-nv-studio.is-ai-closed .igs-nv-studio__body.is-files-open {
  grid-template-columns: minmax(0, 1fr) var(--igs-nv-files-w, 14rem);
}
@media (max-width: 900px) {
  body:not(.igs-ux2-desktop-first) .igs-shell-on .igs-nv-studio.is-ai-open .igs-nv-studio__body,
  body:not(.igs-ux2-desktop-first) .igs-shell-on .igs-pl-studio.is-ai-open .igs-pl-studio__body {
    grid-template-columns: 1fr !important;
    flex-direction: column;
  }
  body:not(.igs-ux2-desktop-first) .igs-shell-on .igs-nv-studio.is-ai-open .igs-nv-studio__body.is-files-open {
    grid-template-columns: 1fr !important;
  }
  body:not(.igs-ux2-desktop-first) .igs-shell-on .igs-nv-files-rail {
    display: none;
  }
  body:not(.igs-ux2-desktop-first) .igs-shell-on .igs-nv-ai-rail,
  body:not(.igs-ux2-desktop-first) .igs-shell-on .igs-pl-ai-rail {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    max-height: min(48vh, 26rem);
  }
}
body.igs-ux2-show-tabs.igs-on-workspace .igs-workspace.igs-shell-on > #igsTabs.igs-nav {
  /* 专业模式须压过 HTML hidden 的 UA display:none */
  display: flex !important;
}

/* 阅读沉浸 · 共享库横幅压成一行 */
body.igs-nv-reading-lean .igs-shell-shared-banner,
.igs-shell-shared-banner.is-reading-lean {
  margin: 0 0 0.3rem;
  padding: 0.28rem 0.55rem;
  gap: 0.4rem;
}
body.igs-nv-reading-lean .igs-shell-shared-banner__hint,
.igs-shell-shared-banner.is-reading-lean .igs-shell-shared-banner__hint {
  display: none;
}
body.igs-nv-reading-lean .igs-shell-shared-banner__copy strong,
.igs-shell-shared-banner.is-reading-lean .igs-shell-shared-banner__copy strong {
  display: inline;
  font-size: 0.8rem;
}

/* —— 小说页瘦壳 P0：默认藏 station + stagebar，底栏 StatusDock —— */
body.igs-on-novel.igs-chrome-novel-slim .igs-workspace.igs-shell-on {
  grid-template-rows: auto 0 0 1fr !important;
  --igs-shell-station-measured-h: 0px;
  --igs-shell-inset-top: calc(var(--igs-shell-chrome-h) + 0.2rem);
}
body.igs-on-novel.igs-chrome-novel-slim .igs-shell-station-nav,
body.igs-on-novel.igs-chrome-novel-slim .igs-shell-stagebar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* —— 写字台：创作模式小说页永久藏双行主站（与 full 偏好解耦） —— */
body.igs-chrome-write-desk.igs-on-novel .igs-workspace.igs-shell-on {
  grid-template-rows: auto 0 0 1fr !important;
  --igs-shell-station-measured-h: 0px;
  --igs-shell-inset-top: calc(var(--igs-shell-chrome-h) + 0.2rem);
}
body.igs-chrome-write-desk.igs-on-novel .igs-shell-station-nav,
body.igs-chrome-write-desk.igs-on-novel .igs-shell-stagebar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
body.igs-chrome-write-desk.igs-on-novel .igs-ux3-law-gate-host {
  display: none !important;
}
body.igs-on-novel.igs-chrome-novel-slim .igs-ux3-law-gate-host {
  display: none !important;
}
body.igs-on-novel.igs-chrome-novel-slim.igs-statusdock-law-peek .igs-ux3-law-gate-host {
  display: block !important;
  position: sticky;
  top: var(--igs-shell-chrome-h);
  z-index: 12;
  max-height: 40vh;
  overflow: auto;
  background: var(--igs-elev, #fff);
  border-bottom: 1px solid var(--igs-line);
}
body.igs-on-novel.igs-chrome-novel-slim .igs-main,
body.igs-on-dialysis .igs-main,
body.igs-on-planning .igs-main {
  padding-bottom: calc(var(--igs-statusdock-h, 2.75rem) + env(safe-area-inset-bottom, 0px) + 0.35rem);
}

/* 底栏快捷导航：固定贴底，不被向导浮窗挡住，也不随主区滚动跑丢 */
:root {
  --igs-statusdock-h: calc(2.65rem + env(safe-area-inset-bottom, 0px));
  --igs-sg-clearance: calc(var(--igs-statusdock-h) + 0.7rem);
}
.igs-shell-statusdock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  margin: 0;
  border-top: 1px solid color-mix(in srgb, var(--igs-line) 90%, #9bb8a6);
  background: color-mix(in srgb, var(--igs-elev, #fff) 96%, #e8f0eb);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 18px rgba(20, 40, 32, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.igs-shell-statusdock[hidden] {
  display: none !important;
}
.igs-shell-statusdock__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  padding: 0.4rem 0.75rem;
  /* 右侧留给「向导」浮窗竖向错位后的视觉留白，避免芯片贴死右下角 */
  padding-right: max(0.75rem, 0.5rem);
  min-height: 2.45rem;
}
.igs-shell-statusdock__chip {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--igs-line) 85%, #8aaa9a);
  background: #fff;
  color: var(--igs-ink, #1a1a1a);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
  max-width: 16rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.igs-shell-statusdock__chip:hover {
  border-color: #6bb89a;
}
.igs-shell-statusdock__chip.is-on {
  background: #e7f7ef;
  border-color: #6bb89a;
  color: #145c45;
}
.igs-shell-statusdock__chip.is-warn {
  background: #fff4e8;
  border-color: #e0a86a;
  color: #8a4b12;
}
.igs-shell-statusdock__book {
  font-size: 0.72rem;
  color: var(--igs-muted, #667);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.igs-shell-statusdock__spacer {
  flex: 1 1 auto;
  min-width: 0.5rem;
}

/* 沉浸阅读：在瘦壳之上再藏 AppChrome + 底栏，观感必须明显 */
body.igs-nv-reading-lean.igs-on-novel .igs-workspace.igs-shell-on {
  grid-template-rows: 0 0 0 1fr !important;
  --igs-shell-chrome-h: 0px;
  --igs-shell-station-measured-h: 0px;
  --igs-shell-inset-top: 0.1rem;
}
body.igs-nv-reading-lean.igs-on-novel .igs-top,
body.igs-nv-reading-lean.igs-on-novel .igs-shell-station-nav,
body.igs-nv-reading-lean.igs-on-novel .igs-shell-stagebar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
body.igs-nv-reading-lean .igs-shell-statusdock {
  display: none !important;
}
body.igs-nv-reading-lean.igs-on-novel .igs-main {
  padding-bottom: 0.5rem;
}

@media (max-width: 700px) {
  .igs-shell-statusdock__book {
    display: none;
  }
}

/* 沉浸阅读：阶段条（定调→发布）与主站调度导航、定律门禁继续折叠 */
body.igs-nv-reading-lean .igs-shell-stagebar {
  display: none !important;
}
body.igs-nv-reading-lean .igs-workspace.igs-shell-on {
  --igs-shell-inset-top: calc(var(--igs-shell-chrome-h) + 0.2rem);
  --igs-shell-station-measured-h: 0px;
}
body.igs-nv-reading-lean .igs-shell-station-nav {
  display: none !important;
}
body.igs-nv-reading-lean .igs-ux3-law-gate-host {
  display: none !important;
}



/* 底栏是快捷导航：保持可读，勿透明到与向导抢位 */
body.igs-chrome-novel-slim .igs-shell-statusdock {
  opacity: 1;
  border-top-color: color-mix(in srgb, var(--igs-line) 80%, #9bb8a6);
  background: color-mix(in srgb, var(--igs-elev, #fff) 97%, #e8f0eb);
}
body.igs-chrome-novel-slim .igs-shell-statusdock__inner {
  padding: 0.32rem 0.7rem;
  min-height: 2.2rem;
  gap: 0.25rem 0.4rem;
}
body.igs-chrome-novel-slim .igs-shell-statusdock__chip {
  padding: 0.18rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 650;
  background: color-mix(in srgb, #fff 88%, var(--igs-elev, #f5f5f5));
  border-color: color-mix(in srgb, var(--igs-line) 75%, #8aaa9a);
  color: var(--igs-ink, #1a1a1a);
}
body.igs-chrome-novel-slim .igs-shell-statusdock__chip:hover,
body.igs-chrome-novel-slim .igs-shell-statusdock__chip.is-on {
  background: #fff;
  border-color: color-mix(in srgb, var(--igs-line) 80%, #8aaa9a);
  color: var(--igs-ink);
}
body.igs-chrome-novel-slim .igs-shell-statusdock__chip.is-warn {
  background: #fff4e8;
  border-color: #e0a86a;
  color: #8a4b12;
}


/* P5：小说瘦壳 · 第1层 AppChrome 压 work/版本/语言；模式切换须常显（智能⇄专业） */
body.igs-on-novel.igs-chrome-novel-slim .igs-shell-chrome-zone--work {
  display: none !important;
}
body.igs-on-novel.igs-chrome-novel-slim #igsShellVersion,
body.igs-on-novel.igs-chrome-novel-slim #igsShellAboutBtn,
body.igs-on-novel.igs-chrome-novel-slim #igsShellLang {
  display: none !important;
}
body.igs-on-novel.igs-chrome-novel-slim .igs-shell-mode-switch {
  display: inline-flex !important;
}
body.igs-on-novel.igs-chrome-novel-slim #igsShellHelpBtn span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
body.igs-on-novel.igs-chrome-novel-slim .igs-top {
  min-height: 2.75rem;
}
body.igs-on-novel.igs-chrome-novel-slim {
  --igs-shell-chrome-h: 2.75rem;
}
body.igs-on-novel.igs-chrome-novel-slim .igs-shell-chrome-extras {
  gap: 0.25rem;
}


/* 共享库：可读可评 · 禁止正文编辑入口（仍可评论） */
body.igs-space-shared .igs-nv-add-ch-quick,
body.igs-space-shared .igs-nv-add-ch,
body.igs-space-shared .igs-nv-immerse-switch__btn.is-write,
body.igs-space-shared .igs-nv-ch-ver__confirm,
body.igs-space-shared [data-nv-working-draft-toggle],
body.igs-space-shared .igs-nv-working-draft,
body.igs-space-shared .igs-mseg-btn[data-nv-mseg="write"],
body.igs-space-shared .igs-nv-write-focus__draft,
body.igs-space-shared [data-nv-write-focus-enter],
body.igs-space-shared [data-nv-add-chapter],
body.igs-space-shared .igs-nv-ch-panel__add {
  display: none !important;
}
body.igs-space-shared .igs-nv-ch-ver.is-shared-ro .igs-nv-ch-ver-ro {
  color: #6b7c74;
  font-size: 0.72rem;
}

/* ─── Chrome Lean v3 · 顶栏简约（单行主站+子页+上下文 · 减堆叠） ─── */
body.igs-chrome-lean-v3.igs-ux2-desktop-first {
  --igs-shell-chrome-h: 2.85rem;
  --igs-shell-station-h: 2.35rem;
}
body.igs-chrome-lean-v3.igs-ux2-desktop-first .igs-shell-on .igs-top {
  padding: 0.28rem 0.85rem;
  gap: 0.45rem 0.75rem;
  min-height: var(--igs-shell-chrome-h);
  border-bottom-color: color-mix(in srgb, var(--igs-line) 55%, transparent);
  background: color-mix(in srgb, var(--igs-paper, #fffaf2) 92%, transparent);
}
body.igs-chrome-lean-v3 .igs-mark {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.42rem;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--igs-accent) 22%, transparent);
}
body.igs-chrome-lean-v3 .igs-brand h1,
body.igs-chrome-lean-v3 .igs-brand #igsBrandTitle {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
body.igs-chrome-lean-v3 .igs-brand__novel {
  font-size: 0.68rem;
  font-weight: 550;
  padding: 0.06rem 0.35rem;
  max-width: min(14rem, 28vw);
  background: color-mix(in srgb, var(--igs-ink) 4%, transparent);
  border-color: transparent;
}
body.igs-chrome-lean-v3 .igs-top-actions {
  gap: 0.28rem;
  flex-wrap: nowrap;
}
body.igs-chrome-lean-v3 .igs-top-actions > input[type='search'],
body.igs-chrome-lean-v3 #igsGlobalSearch {
  min-width: 9rem;
  max-width: 14rem;
  height: 1.9rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 0.45rem;
  border-color: color-mix(in srgb, var(--igs-line) 70%, transparent);
  background: color-mix(in srgb, var(--igs-elev, #fff) 70%, transparent);
}
body.igs-chrome-lean-v3 .igs-shell-points-quick {
  min-height: 1.9rem;
  padding: 0.15rem 0.5rem;
  gap: 0.2rem;
  border-radius: 0.45rem;
  font-size: 0.72rem;
}
body.igs-chrome-lean-v3 .igs-shell-points-quick__leaf {
  font-size: 0.85rem;
}
body.igs-chrome-lean-v3 .igs-account-chip {
  min-height: 1.9rem;
  padding: 0.18rem 0.55rem;
  font-size: 0.74rem;
  border-radius: 0.45rem;
  font-weight: 550;
}
body.igs-chrome-lean-v3 .igs-shell-btn-ico {
  min-height: 1.9rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.42rem;
  font-size: 0.74rem;
  font-weight: 550;
}
body.igs-chrome-lean-v3 .igs-shell-btn-ico svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.65;
  opacity: 0.9;
}
body.igs-chrome-lean-v3 .igs-shell-chrome-zone--work {
  gap: 0.2rem;
  padding-inline-end: 0.28rem;
  border-inline-end-color: color-mix(in srgb, var(--igs-line) 50%, transparent);
}
body.igs-chrome-lean-v3 .igs-shell-space-switch {
  margin: 0 0.4rem 0 0.28rem;
  padding: 0.12rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--igs-ink) 4%, transparent);
  border-color: transparent;
}
body.igs-chrome-lean-v3.igs-ux2-desktop-first .igs-workspace.igs-shell-on > .igs-shell-station-nav {
  padding: 0.12rem 0.75rem 0.14rem;
  gap: 0;
  background: color-mix(in srgb, var(--igs-card) 70%, var(--igs-paper));
  border-bottom-color: color-mix(in srgb, var(--igs-line) 48%, transparent);
  backdrop-filter: blur(6px);
}
body.igs-chrome-lean-v3 .igs-shell-station-nav__row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  min-height: 2.1rem;
  min-width: 0;
  width: 100%;
}
body.igs-chrome-lean-v3 .igs-shell-station-nav__primary {
  flex: 0 0 auto;
  padding: 0.12rem;
  gap: 0.08rem;
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--igs-ink) 3.5%, var(--igs-elev));
  border-color: transparent;
  box-shadow: none;
}
body.igs-chrome-lean-v3 .igs-shell-station-btn {
  min-height: 1.85rem;
  padding: 0.18rem 0.55rem;
  gap: 0.22rem;
  border-radius: 0.42rem;
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0;
}
body.igs-chrome-lean-v3 .igs-shell-station-btn svg,
body.igs-chrome-lean-v3 .igs-shell-station-btn__ico svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.7;
}
body.igs-chrome-lean-v3 .igs-shell-station-btn.is-on {
  font-weight: 650;
  box-shadow: 0 1px 6px color-mix(in srgb, var(--igs-accent) 24%, transparent);
}
body.igs-chrome-lean-v3 .igs-shell-station-subnav {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-top: none;
  gap: 0.15rem;
}
body.igs-chrome-lean-v3 .igs-shell-station-subbtn {
  padding: 0.16rem 0.48rem;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 0.38rem;
  gap: 0.2rem;
}
body.igs-chrome-lean-v3 .igs-shell-station-subbtn.is-on {
  box-shadow: none;
  font-weight: 600;
  background: color-mix(in srgb, var(--igs-accent) 10%, var(--igs-surface, #fff));
  border-color: color-mix(in srgb, var(--igs-accent) 22%, transparent);
}
body.igs-chrome-lean-v3 .igs-shell-station-subbtn__ico svg,
body.igs-chrome-lean-v3 .igs-shell-station-subbtn svg {
  width: 13px;
  height: 13px;
}
body.igs-chrome-lean-v3 .igs-shell-station-context {
  flex: 0 1 auto;
  max-width: min(38%, 28rem);
  margin: 0;
  margin-inline-start: auto;
  padding: 0;
  border-top: none;
  gap: 0.35rem;
  font-size: 0.7rem;
  overflow-x: auto;
  flex-wrap: nowrap;
}
body.igs-chrome-lean-v3 .igs-shell-station-context__book em {
  display: none;
}
body.igs-chrome-lean-v3 .igs-shell-station-context__book strong {
  max-width: 9rem;
  font-weight: 600;
  font-size: 0.72rem;
}
body.igs-chrome-lean-v3 .igs-shell-station-context__page {
  padding: 0.1rem 0.38rem;
  border-radius: 0.35rem;
  font-size: 0.68rem;
}
body.igs-chrome-lean-v3 .igs-shell-station-context__open {
  min-height: 1.65rem;
  padding: 0.12rem 0.45rem;
  border-radius: 0.38rem;
  font-size: 0.68rem;
  font-weight: 600;
}
body.igs-chrome-lean-v3 .igs-shell-station-context__ai {
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.68rem;
  max-width: 10rem;
}
body.igs-chrome-lean-v3 .igs-shell-station-context__wins {
  padding: 0.08rem;
  gap: 0.1rem;
}
body.igs-chrome-lean-v3 .igs-shell-station-context__win {
  min-height: 1.45rem;
  padding: 0.08rem 0.38rem;
  font-size: 0.66rem;
  border-radius: 0.32rem;
}
/* 创作态再压一档 */
body.igs-chrome-lean-v3.igs-chrome-create .igs-shell-station-nav__row {
  min-height: 1.95rem;
}
body.igs-chrome-lean-v3.igs-chrome-create .igs-shell-station-btn {
  min-height: 1.7rem;
  padding: 0.14rem 0.45rem;
  font-size: 0.74rem;
}

/* 项目首页 · 书优先 */
.igs-ux2-continue__lead {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(70, 55, 40, 0.72);
  max-width: 36rem;
}
.igs-ux2-continue__produce {
  margin: 0.45rem 0 0;
  border-radius: 10px;
  border: 1px solid rgba(120, 90, 60, 0.12);
  background: rgba(255, 252, 247, 0.65);
  padding: 0.35rem 0.55rem 0.45rem;
}
.igs-ux2-continue__produce > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: rgba(70, 55, 40, 0.78);
  font-weight: 600;
  padding: 0.2rem 0;
}
.igs-ux2-continue__produce > summary::-webkit-details-marker { display: none; }
.igs-ux2-continue__produce .igs-ux2-continue__quick.is-produce {
  margin-top: 0.35rem;
}

/* —— 成品站：主站 + 相关子导航 · 影格区分（非默认绿点） —— */
:root {
  --igs-produce-ink: #1c2421;
  --igs-produce-amber: #b8892d;
  --igs-produce-amber-soft: #e8d5a8;
  --igs-produce-teal: #2a6b5a;
  --igs-produce-film: color-mix(in srgb, var(--igs-produce-ink) 88%, var(--igs-produce-amber) 12%);
}

.igs-shell-station-btn--produce {
  position: relative;
}
.igs-shell-station-btn--produce .igs-shell-station-btn__ico {
  color: color-mix(in srgb, var(--igs-produce-amber) 70%, var(--igs-produce-teal));
}
.igs-shell-station-btn--produce.is-on {
  color: #f7f1e4;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--igs-produce-film) 92%, #000) 0%,
      color-mix(in srgb, var(--igs-produce-teal) 55%, var(--igs-produce-ink)) 100%
    );
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--igs-produce-amber-soft) 35%, transparent),
    0 6px 18px color-mix(in srgb, var(--igs-produce-ink) 28%, transparent);
  border: 1px solid color-mix(in srgb, var(--igs-produce-amber) 42%, transparent);
}
.igs-shell-station-btn--produce.is-on .igs-shell-station-btn__ico {
  color: var(--igs-produce-amber-soft);
}
.igs-shell-station-btn--produce.is-on::after {
  content: '';
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: 0.18rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--igs-produce-amber) 20%,
    var(--igs-produce-amber-soft) 50%,
    var(--igs-produce-amber) 80%,
    transparent
  );
  opacity: 0.85;
  pointer-events: none;
}

body.igs-station-produce .igs-shell-station-nav__row.is-produce-lane {
  gap: 0.65rem;
}
body.igs-station-produce .igs-shell-station-nav__primary {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--igs-produce-amber) 22%, transparent);
}

.igs-shell-station-subnav--produce {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.22rem !important;
  padding: 0.22rem 0.4rem 0.22rem 0.7rem !important;
  border-radius: 0.65rem;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--igs-produce-amber-soft) 18%, var(--igs-elev, #fff)) 0%,
      color-mix(in srgb, var(--igs-produce-ink) 4%, var(--igs-elev, #fff)) 100%
    );
  border: 1px solid color-mix(in srgb, var(--igs-produce-amber) 28%, var(--igs-line, #ddd));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent),
    0 4px 14px color-mix(in srgb, var(--igs-produce-ink) 8%, transparent);
}
.igs-shell-station-subnav--produce::before {
  content: '';
  position: absolute;
  left: 0.28rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 0.28rem;
  border-radius: 2px;
  background:
    repeating-linear-gradient(
      180deg,
      var(--igs-produce-ink) 0 3px,
      transparent 3px 6px
    );
  opacity: 0.35;
  pointer-events: none;
}
.igs-shell-station-subnav--produce .igs-shell-station-subbtn.is-produce-chip {
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--igs-produce-ink) 3%, transparent);
  color: color-mix(in srgb, var(--igs-produce-ink) 82%, var(--igs-produce-teal));
  font-weight: 560;
  letter-spacing: 0.01em;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.igs-shell-station-subnav--produce .igs-shell-station-subbtn.is-produce-chip:hover {
  border-color: color-mix(in srgb, var(--igs-produce-amber) 40%, transparent);
  background: color-mix(in srgb, var(--igs-produce-amber-soft) 35%, transparent);
  transform: translateY(-1px);
}
.igs-shell-station-subnav--produce .igs-shell-station-subbtn.is-produce-chip.is-on {
  color: #1a1814;
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--igs-produce-amber-soft) 88%, #fff) 0%,
      color-mix(in srgb, var(--igs-produce-amber) 55%, #f3e6c8) 100%
    );
  border-color: color-mix(in srgb, var(--igs-produce-amber) 55%, transparent);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 70%, transparent),
    0 3px 10px color-mix(in srgb, var(--igs-produce-amber) 28%, transparent);
  font-weight: 700;
}
.igs-shell-station-subnav--produce .igs-shell-station-subbtn.is-produce-chip.is-on .igs-shell-station-subbtn__ico {
  color: var(--igs-produce-teal);
}

/* 专业模式顶栏：成品相关分组高亮 */
body.igs-station-produce.igs-ux2-show-tabs .igs-nav-g[data-nav-g="shot"] {
  position: relative;
  padding: 0.2rem 0.35rem 0.35rem;
  border-radius: 0.7rem;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--igs-produce-amber-soft) 22%, transparent) 0%,
      color-mix(in srgb, var(--igs-produce-ink) 3%, transparent) 100%
    );
  border: 1px solid color-mix(in srgb, var(--igs-produce-amber) 30%, transparent);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--igs-produce-ink) 7%, transparent);
}
body.igs-station-produce.igs-ux2-show-tabs .igs-nav-g[data-nav-g="shot"] > .igs-nav-lab {
  color: var(--igs-produce-teal);
  font-weight: 700;
  letter-spacing: 0.06em;
}
body.igs-station-produce.igs-ux2-show-tabs .igs-nav-g[data-nav-g="shot"] .igs-nav-row > .igs-tab-with-refresh > [data-tab].active,
body.igs-station-produce.igs-ux2-show-tabs .igs-nav-g[data-nav-g="shot"] .igs-nav-row > .igs-tab-with-refresh > [data-tab].is-on,
body.igs-station-produce.igs-ux2-show-tabs .igs-nav-g[data-nav-g="shot"] .igs-nav-row [data-tab][aria-selected="true"] {
  background: linear-gradient(165deg, #f3e6c8, #e0c57a);
  color: #1a1814;
  border-color: color-mix(in srgb, var(--igs-produce-amber) 50%, transparent);
  font-weight: 700;
}

body.igs-chrome-lean-v3.igs-station-produce .igs-shell-station-btn--produce.is-on {
  min-height: 1.95rem;
  padding-inline: 0.7rem;
}
