/**
 * 制作台 · Studio UX2 壳层 Grid / 四主站 / desktop-first（P-css-o：chrome-ui/drawer 已外置）
 */

:root {
  --igs-shell-chrome-h: 3.25rem;
  --igs-shell-stagebar-h: 2rem;
  --igs-shell-drawer-w: clamp(16.5rem, 17vw, 21rem);
  --igs-shell-drawer-peek: 3.4rem;
  --igs-shell-rail-w: clamp(20rem, 22vw, 26rem);
  --igs-shell-rail-w-md: clamp(18rem, 20vw, 23rem);
  --igs-shell-rail-w-lg: clamp(22rem, 24vw, 28rem);
  --igs-shell-rail-w-sm: clamp(17rem, 32vw, 20.5rem);
  --igs-shell-station-h: 2.85rem;
  --igs-shell-station-measured-h: var(--igs-shell-station-h);
  --igs-shell-mnav-h: calc(3.65rem + env(safe-area-inset-bottom, 0px));
  --igs-shell-stage-pad-x: clamp(0.75rem, 1.8vw, 1.85rem);
  --igs-shell-stage-pad-y: clamp(0.55rem, 1.2vh, 1rem);
  --igs-shell-inset-top: calc(var(--igs-shell-chrome-h) + var(--igs-shell-station-measured-h) + 0.35rem);
}
.igs-workspace.igs-shell-on:not(.igs-shell-stagebar-off) {
  --igs-shell-inset-top: calc(
    var(--igs-shell-chrome-h) + var(--igs-shell-station-measured-h) + var(--igs-shell-stagebar-h) + 0.45rem
  );
}

/* 覆盖 body.igs-on-workspace 对 workspace 的 flex 列，否则 grid-area 失效、阶段条等会堆到右下 */
body.igs-on-workspace .igs-workspace.igs-shell-on {
  display: grid !important;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  grid-template-rows: auto auto auto 1fr !important;
  grid-template-columns: var(--igs-shell-drawer-active, var(--igs-shell-drawer-peek)) minmax(0, 1fr) !important;
  grid-template-areas:
    "chrome chrome"
    "station station"
    "stagebar stagebar"
    "drawer main" !important;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Safari / 旧 WebKit：dvh 不完整时仍占满视口 */
body.igs-nav-rail.igs-on-workspace .igs-workspace.igs-shell-on {
  grid-template-rows: auto auto auto 1fr !important;
  grid-template-columns: var(--igs-shell-drawer-active, var(--igs-shell-drawer-peek)) minmax(0, 1fr) !important;
  grid-template-areas:
    "chrome chrome"
    "station station"
    "stagebar stagebar"
    "drawer main" !important;
}

.igs-workspace.igs-shell-on {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  grid-template-columns: var(--igs-shell-drawer-active, var(--igs-shell-drawer-peek)) minmax(0, 1fr);
  grid-template-areas:
    "chrome chrome"
    "station station"
    "stagebar stagebar"
    "drawer main";
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  width: 100%;
  max-width: none;
  /* 用户拖宽优先；未拖时用壳层默认；上限恒为视口 2/3（勿再用 shell-rail 压死） */
  --igs-ws-rail: var(--igs-ws-rail-user, var(--igs-shell-rail-w));
  --igs-chat-side-w: var(--igs-chat-side-user, var(--igs-shell-rail-w));
  --igs-chat-max-w: 66.666vw;
}

.igs-shell-on .igs-top { grid-area: chrome; }
.igs-shell-station-nav { grid-area: station; }
.igs-shell-stagebar { grid-area: stagebar; }
.igs-shell-drawer { grid-area: drawer; }
.igs-shell-on .igs-main {
  grid-area: main;
  min-height: 0;
  overflow: hidden;
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  flex: 1 1 auto;
}

/* UX2 壳层替代 legacy 流水线/上下文条，避免与阶段条重复并挤占 grid 末格 */
.igs-workspace.igs-shell-on > .igs-qa,
.igs-workspace.igs-shell-on > #igsPipeline,
.igs-workspace.igs-shell-on > #igsContextBar,
.igs-workspace.igs-shell-on > #igsMobileNav,
.igs-workspace.igs-shell-on > .igs-mmore {
  display: none !important;
}

/* legacy 全 Tab 行：仅专业模式（L3+）显示；创作模式用四主站 + 二级页签 */
.igs-workspace.igs-shell-on > #igsTabs {
  display: none !important;
}
body.igs-ux2-show-tabs.igs-on-workspace .igs-workspace.igs-shell-on > #igsTabs.igs-nav {
  display: flex !important;
  grid-area: station !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: var(--igs-shell-station-h);
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  border-bottom: 1px solid var(--igs-line, rgba(0, 0, 0, 0.08));
  scrollbar-width: thin;
}
body.igs-ux2-show-tabs.igs-on-workspace .igs-workspace.igs-shell-on > .igs-shell-station-nav {
  display: none !important;
}
body.igs-ux2-creator-nav.igs-on-workspace .igs-workspace.igs-shell-on > .igs-shell-station-nav {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  grid-area: station !important;
}
/* 进聊天主站：四主站条仍占位可见，不被成片/聊天主区盖住 */
body.igs-on-studioChat.igs-ux2-creator-nav.igs-on-workspace .igs-workspace.igs-shell-on > .igs-shell-station-nav {
  display: flex !important;
  z-index: 5;
}

/* 复制坞仍 fixed 底栏，不参与 grid 占位 */
.igs-workspace.igs-shell-on > #igsDock {
  grid-area: main;
  justify-self: stretch;
  align-self: end;
}
.igs-workspace.igs-shell-on > #igsDock[hidden] {
  display: none !important;
}

.igs-shell-stagebar[hidden],
.igs-workspace.igs-shell-stagebar-off > .igs-shell-stagebar {
  display: none !important;
}

.igs-shell-on {
  --igs-shell-drawer-active: var(--igs-shell-drawer-peek);
}
.igs-shell-on.igs-shell-drawer-open {
  --igs-shell-drawer-active: var(--igs-shell-drawer-w);
}

/* 桌面：抽屉面板浮层展开，主区保持全宽（避免选书时主区被挤成窄条） */
@media (min-width: 901px) {
  .igs-workspace.igs-shell-on.igs-shell-drawer-open {
    --igs-shell-drawer-active: var(--igs-shell-drawer-peek);
  }
  .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__panel {
    position: fixed;
    left: var(--igs-shell-drawer-peek);
    top: var(--igs-shell-inset-top);
    bottom: 0;
    width: var(--igs-shell-drawer-w);
    max-width: min(22rem, 34vw);
    z-index: 215;
    box-shadow: 8px 0 28px rgba(16, 36, 28, 0.14);
    background: var(--igs-card, var(--igs-surface, #faf8f4));
    border-inline-end: 1px solid var(--igs-line, rgba(0, 0, 0, 0.08));
    isolation: isolate;
    pointer-events: auto;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__head,
  .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__body {
    background: inherit;
  }
  .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer-scrim {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: calc(var(--igs-shell-drawer-peek) + min(var(--igs-shell-drawer-w), 22rem, 34vw));
    z-index: 210;
    border: 0;
    background: rgba(12, 24, 20, 0.28);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    cursor: pointer;
  }
}

/* 桌面优先阶段：统一走 peek + 浮层侧栏 · 四主站顶栏 · 无移动底栏 */
body.igs-ux2-desktop-first {
  --igs-shell-mnav-h: 0px;
  /* 侧栏令牌跟随 html[data-igs-theme]（浅色：墨色轨；深色：elev 轨）· themes-surfaces 可再覆写 */
  --igs-shell-peek-bg: color-mix(in srgb, var(--igs-ink) 86%, var(--igs-accent) 14%);
  --igs-shell-peek-ink: var(--igs-paper);
  --igs-shell-peek-accent: color-mix(in srgb, var(--igs-accent) 45%, #ffffff);
  --igs-shell-peek-line: color-mix(in srgb, var(--igs-paper) 18%, transparent);
  --igs-shell-panel-bg: var(--igs-card);
  --igs-shell-panel-ink: var(--igs-ink);
  --igs-shell-panel-muted: var(--igs-muted);
  --igs-shell-panel-chip: color-mix(in srgb, var(--igs-ink) 5%, transparent);
  --igs-shell-panel-chip-on: color-mix(in srgb, var(--igs-accent) 16%, var(--igs-elev));
}
html.igs-theme-dark body.igs-ux2-desktop-first {
  --igs-shell-peek-bg: color-mix(in srgb, var(--igs-elev) 82%, var(--igs-paper));
  --igs-shell-peek-ink: var(--igs-ink);
  --igs-shell-peek-accent: var(--igs-accent);
  --igs-shell-peek-line: color-mix(in srgb, var(--igs-line) 70%, transparent);
  --igs-shell-panel-bg: var(--igs-card);
  --igs-shell-panel-ink: var(--igs-ink);
  --igs-shell-panel-muted: var(--igs-muted);
  --igs-shell-panel-chip: color-mix(in srgb, var(--igs-ink) 8%, transparent);
  --igs-shell-panel-chip-on: color-mix(in srgb, var(--igs-accent) 22%, transparent);
}
body.igs-ux2-desktop-first .igs-workspace.igs-shell-on .igs-shell-drawer {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--igs-shell-peek-bg) 92%, var(--igs-ink)),
    var(--igs-shell-peek-bg)
  );
  border-inline-end: 1px solid var(--igs-shell-peek-line);
  color: var(--igs-shell-peek-ink);
  box-shadow: inset -1px 0 0 color-mix(in srgb, var(--igs-ink) 18%, transparent);
}
body.igs-ux2-desktop-first .igs-shell-drawer__peek-btn {
  color: color-mix(in srgb, var(--igs-shell-peek-ink) 88%, transparent);
  background: color-mix(in srgb, var(--igs-shell-peek-ink) 6%, transparent);
  border-color: color-mix(in srgb, var(--igs-shell-peek-ink) 12%, transparent);
}
body.igs-ux2-desktop-first .igs-shell-drawer__peek-btn:hover,
body.igs-ux2-desktop-first .igs-shell-drawer__peek-btn.is-on {
  background: color-mix(in srgb, var(--igs-shell-peek-accent) 28%, transparent);
  color: var(--igs-shell-peek-ink);
  border-color: color-mix(in srgb, var(--igs-shell-peek-accent) 55%, transparent);
}
body.igs-ux2-desktop-first .igs-shell-drawer__peek-btn svg {
  opacity: 1;
  color: inherit;
}
body.igs-ux2-desktop-first.igs-on-workspace .igs-workspace.igs-shell-on {
  --igs-shell-drawer-active: var(--igs-shell-drawer-peek);
}
body.igs-ux2-desktop-first .igs-workspace.igs-shell-on.igs-shell-drawer-open {
  --igs-shell-drawer-active: var(--igs-shell-drawer-peek);
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__panel {
  position: fixed;
  left: var(--igs-shell-drawer-peek);
  top: var(--igs-shell-inset-top);
  bottom: 0;
  width: var(--igs-shell-drawer-w);
  max-width: min(22rem, 34vw);
  z-index: 215;
  box-shadow: 10px 0 36px rgba(8, 12, 24, 0.45);
  background: var(--igs-shell-panel-bg);
  color: var(--igs-shell-panel-ink);
  border-inline-end: 1px solid var(--igs-shell-peek-line);
  isolation: isolate;
  pointer-events: auto;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__head,
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__body {
  background: transparent;
  color: inherit;
  border-color: var(--igs-shell-peek-line);
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__group-lab {
  color: var(--igs-shell-panel-muted);
  opacity: 1;
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__item {
  color: var(--igs-shell-panel-ink);
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__item:hover {
  background: var(--igs-shell-panel-chip);
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__item--primary {
  background: var(--igs-shell-panel-chip-on);
  border-color: color-mix(in srgb, var(--igs-shell-peek-accent) 45%, transparent);
  color: #fff;
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__book-card,
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__book-select,
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__path {
  background: var(--igs-shell-panel-chip);
  border-color: var(--igs-shell-peek-line);
  color: var(--igs-shell-panel-ink);
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__book-card.is-on {
  background: var(--igs-shell-panel-chip-on);
  border-color: color-mix(in srgb, var(--igs-shell-peek-accent) 50%, transparent);
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__path code,
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer__book-id {
  color: var(--igs-shell-panel-muted);
}
body.igs-ux2-desktop-first .igs-shell-on.igs-shell-drawer-open .igs-shell-drawer-scrim {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: calc(var(--igs-shell-drawer-peek) + min(var(--igs-shell-drawer-w), 22rem, 34vw));
  z-index: 210;
  border: 0;
  background: rgba(8, 12, 22, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
body.igs-ux2-desktop-first .igs-shell-on .igs-shell-chrome-zone--work #igsShellDrawerBtn,
body.igs-ux2-desktop-first .igs-shell-on .igs-shell-chrome-zone--work #igsShellToolsBtn {
  display: none !important;
}
body.igs-ux2-desktop-first .igs-shell-mnav,
body.igs-ux2-desktop-first .igs-shell-drawer-fab {
  display: none !important;
}
body.igs-ux2-desktop-first.igs-ux2-creator-nav.igs-on-workspace .igs-workspace.igs-shell-on > .igs-shell-station-nav {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  grid-area: station !important;
}
body.igs-ux2-desktop-first .igs-shell-on .igs-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 !important;
}
body.igs-ux2-desktop-first .igs-shell-on .igs-nv-studio.is-ai-open .igs-nv-studio__body,
body.igs-ux2-desktop-first .igs-shell-on .igs-pl-studio.is-ai-open .igs-pl-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)) !important;
  flex-direction: row !important;
}
body.igs-ux2-desktop-first .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)) !important;
}
body.igs-ux2-desktop-first .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) !important;
  flex-direction: row !important;
}
body.igs-ux2-desktop-first .igs-shell-on .igs-nv-ai-rail,
body.igs-ux2-desktop-first .igs-shell-on .igs-pl-ai-rail {
  width: min(var(--igs-ws-rail, var(--igs-shell-rail-w)), var(--igs-chat-max-w, 66.666vw));
  max-width: min(var(--igs-ws-rail, var(--igs-shell-rail-w)), var(--igs-chat-max-w, 66.666vw));
  max-height: none;
}
body.igs-ux2-desktop-first .igs-ux2-continue__layout {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.85rem, 2.2vw, 1.5rem);
}
body.igs-ux2-desktop-first .igs-ux2-continue.has-aside .igs-ux2-continue__layout {
  grid-template-columns: minmax(16rem, 0.95fr) minmax(0, 1.35fr);
}
body.igs-ux2-desktop-first .igs-ux2-continue.has-aside.has-shelf .igs-ux2-continue__layout {
  grid-template-columns: minmax(16rem, 0.88fr) minmax(0, 1.28fr) minmax(14rem, 0.92fr);
}
@media (min-width: 1280px) {
  body.igs-ux2-desktop-first .igs-ux2-continue.has-aside .igs-ux2-continue__layout {
    grid-template-columns: minmax(18rem, 0.9fr) minmax(0, 1.45fr);
  }
  body.igs-ux2-desktop-first .igs-ux2-continue.has-aside.has-shelf .igs-ux2-continue__layout {
    grid-template-columns: minmax(18rem, 0.82fr) minmax(0, 1.38fr) minmax(16rem, 0.95fr);
  }
  body.igs-ux2-desktop-first .igs-ux2-continue__shelf-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr));
  }
}
@media (min-width: 1600px) {
  body.igs-ux2-desktop-first .igs-workspace.igs-shell-on {
    --igs-ws-rail: var(--igs-ws-rail-user, var(--igs-shell-rail-w-lg));
    --igs-chat-side-w: var(--igs-chat-side-user, var(--igs-shell-rail-w-lg));
  }
  body.igs-ux2-desktop-first .igs-ux2-continue.has-aside .igs-ux2-continue__layout {
    grid-template-columns: minmax(20rem, 0.88fr) minmax(0, 1.52fr);
  }
  body.igs-ux2-desktop-first .igs-ux2-continue__shelf-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr));
    max-height: min(58vh, 26rem);
  }
}
@media (min-width: 1920px) {
  body.igs-ux2-desktop-first .igs-ux2-continue.has-aside.has-shelf .igs-ux2-continue__layout {
    grid-template-columns: minmax(20rem, 0.8fr) minmax(0, 1.42fr) minmax(18rem, 1fr);
  }
}

.igs-shell-rail-host {
  display: none !important;
}

body.igs-ux2-l3:not(.igs-shell-on) #igsTabs {
  display: flex;
}

body.igs-ux2-show-tabs .igs-shell-station-nav { display: none !important; }

body.igs-ux2-desktop-first .igs-shell-station-context {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: auto;
}
body.igs-ux2-desktop-first .igs-shell-station-nav__primary {
  flex-wrap: nowrap;
}
body.igs-ux2-desktop-first .igs-shell-station-subnav {
  -webkit-overflow-scrolling: auto;
}

.igs-shell-station-nav {
  display: none;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem 0.45rem;
  border-bottom: 1px solid color-mix(in srgb, var(--igs-line) 72%, transparent);
  background: color-mix(in srgb, var(--igs-card) 88%, var(--igs-paper));
  color: var(--igs-ink);
  backdrop-filter: blur(8px);
}
.igs-shell-station-nav__primary {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  padding: 0.2rem;
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--igs-ink) 4.5%, var(--igs-elev));
  border: 1px solid color-mix(in srgb, var(--igs-line) 70%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--igs-elev) 55%, transparent);
}

.igs-shell-station-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0.34rem 0.85rem;
  border-radius: 0.52rem;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  color: var(--igs-muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.igs-shell-station-btn:hover {
  color: var(--igs-ink);
  background: color-mix(in srgb, var(--igs-accent) 8%, transparent);
}
.igs-shell-station-btn__ico {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  color: inherit;
}
.igs-shell-station-btn svg,
.igs-shell-station-btn__ico svg {
  width: 17px;
  height: 17px;
  opacity: 0.92;
  stroke-width: 1.75;
}
.igs-shell-station-subnav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0.2rem 0 0.05rem;
  border-top: 1px dashed color-mix(in srgb, var(--igs-line) 80%, transparent);
  margin-top: 0.25rem;
}
.igs-shell-station-subbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  padding: 0.28rem 0.7rem;
  border-radius: 0.45rem;
  cursor: pointer;
  color: var(--igs-muted, #667);
}
.igs-shell-station-subbtn.is-pin {
  font-weight: 600;
}
.igs-shell-station-subbtn:not(.is-pin):not(.is-on) {
  opacity: 0.72;
}
.igs-shell-station-subbtn svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}
.igs-shell-station-subbtn__ico {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}
.igs-shell-station-subbtn__ico svg {
  width: 14px;
  height: 14px;
  opacity: 0.92;
}
.igs-shell-station-subbtn.is-on {
  background: var(--igs-surface, #fff);
  border-color: var(--igs-line);
  color: var(--igs-accent, #2d6a4f);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(20, 40, 32, 0.08);
}
.igs-shell-station-btn.is-on {
  background: var(--igs-accent);
  border-color: transparent;
  color: var(--igs-on-accent, #fff);
  font-weight: 650;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--igs-accent) 32%, transparent);
}
.igs-shell-station-btn.is-on svg {
  opacity: 1;
  color: inherit;
}

.igs-shell-station-context {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.28rem 0.75rem 0.38rem;
  border-top: 1px dashed color-mix(in srgb, var(--igs-line) 75%, transparent);
  font-size: 0.78rem;
  color: var(--igs-muted, #667);
}
.igs-shell-station-context__book,
.igs-shell-station-context__page {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}
.igs-shell-station-context__book strong {
  color: var(--igs-ink, #1a2e28);
  font-weight: 650;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.igs-shell-station-context__book em {
  font-style: normal;
  opacity: 0.72;
  font-size: 0.72rem;
}
.igs-shell-station-context__page {
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--igs-accent, #2d6a4f) 8%, transparent);
  color: var(--igs-accent, #2d6a4f);
  font-weight: 600;
}
.igs-shell-station-context__page svg {
  width: 14px;
  height: 14px;
}
.igs-shell-station-context__open {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.85rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--igs-accent) 35%, var(--igs-line));
  background: color-mix(in srgb, var(--igs-accent) 10%, var(--igs-surface, #fff));
  color: var(--igs-accent, #2d6a4f);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
}
.igs-shell-station-context__open svg {
  width: 14px;
  height: 14px;
}
.igs-shell-station-context__open:hover {
  background: color-mix(in srgb, var(--igs-accent) 16%, var(--igs-surface, #fff));
}

.igs-shell-station-context__ai {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--igs-ai, #6b4fa2) 10%, transparent);
  color: color-mix(in srgb, var(--igs-ai, #6b4fa2) 88%, var(--igs-ink, #1a2e28));
  font-weight: 600;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.igs-shell-station-context__ai svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.igs-shell-station-context__ai em {
  font-style: normal;
  opacity: 0.82;
  font-weight: 550;
}

.igs-shell-station-context__wins {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--igs-ai, #6b4fa2) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--igs-ai, #6b4fa2) 18%, var(--igs-line));
}
.igs-shell-station-context__win {
  min-height: 1.65rem;
  padding: 0.15rem 0.5rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--igs-ai, #6b4fa2) 82%, var(--igs-ink, #1a2e28));
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.igs-shell-station-context__win.is-on {
  background: color-mix(in srgb, var(--igs-ai, #6b4fa2) 18%, var(--igs-surface, #fff));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--igs-ai, #6b4fa2) 22%, transparent);
}
.igs-shell-station-context__win:hover:not(.is-on) {
  background: color-mix(in srgb, var(--igs-ai, #6b4fa2) 10%, transparent);
}
.igs-shell-station-context__wins.is-compact {
  gap: 0.12rem;
  padding: 0.08rem;
}
.igs-shell-station-context__wins.is-compact .igs-shell-station-context__win {
  min-height: 1.5rem;
  padding: 0.12rem 0.42rem;
  font-size: 0.68rem;
}
.igs-shell-station-context__ai-role {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--igs-ai, #6b4fa2) 8%, transparent);
  color: color-mix(in srgb, var(--igs-ai, #6b4fa2) 82%, var(--igs-ink, #1a2e28));
  font-weight: 600;
  font-size: 0.72rem;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.igs-shell-station-context__ai-role svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.igs-shell-station-context__review.is-linked,
.igs-shell-station-context__next.is-linked {
  box-shadow: 0 0 0 2px color-mix(in srgb, #c47a2c 35%, transparent);
}

.igs-shell-station-context__linked-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
}
.igs-shell-station-context__linked-bridge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  flex-shrink: 0;
  color: #c47a2c;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.72;
}
.igs-shell-station-context__linked-bridge::before {
  content: '→';
}

/* 桌面浏览器：待审↔下一站联动脉冲（不考虑手机端） */
@media (min-width: 901px) {
  @keyframes igs-shell-linked-review-pulse {
    0%,
    100% {
      box-shadow: 0 0 0 2px color-mix(in srgb, #c47a2c 28%, transparent);
    }
    50% {
      box-shadow:
        0 0 0 3px color-mix(in srgb, #c47a2c 48%, transparent),
        0 0 14px color-mix(in srgb, #c47a2c 16%, transparent);
    }
  }
  @keyframes igs-shell-linked-next-pulse {
    0%,
    100% {
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--igs-accent, #2d6a4f) 28%, transparent);
    }
    50% {
      box-shadow:
        0 0 0 3px color-mix(in srgb, var(--igs-accent, #2d6a4f) 46%, transparent),
        0 0 14px color-mix(in srgb, var(--igs-accent, #2d6a4f) 14%, transparent);
    }
  }
  @keyframes igs-shell-linked-bridge-pulse {
    0%,
    100% {
      opacity: 0.55;
      transform: translateX(0);
    }
    50% {
      opacity: 1;
      transform: translateX(2px);
    }
  }
  .igs-shell-station-context.is-review-linked .igs-shell-station-context__review.is-linked {
    animation: igs-shell-linked-review-pulse 2.6s ease-in-out infinite;
  }
  .igs-shell-station-context.is-review-linked .igs-shell-station-context__next.is-linked {
    animation: igs-shell-linked-next-pulse 2.6s ease-in-out infinite;
    animation-delay: 0.35s;
  }
  .igs-shell-station-context.is-review-linked .igs-shell-station-context__linked-bridge {
    animation: igs-shell-linked-bridge-pulse 2.6s ease-in-out infinite;
    animation-delay: 0.18s;
  }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .igs-shell-station-context.is-review-linked .igs-shell-station-context__review.is-linked,
  .igs-shell-station-context.is-review-linked .igs-shell-station-context__next.is-linked,
  .igs-shell-station-context.is-review-linked .igs-shell-station-context__linked-bridge {
    animation: none;
  }
}

.igs-shell-station-context__pro-role {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--igs-ai, #6b4fa2) 10%, transparent);
  color: color-mix(in srgb, var(--igs-ai, #6b4fa2) 88%, var(--igs-ink, #1a2e28));
  font-weight: 600;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.igs-shell-station-context__pro-role svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.igs-shell-station-context__review {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.85rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #c47a2c 40%, var(--igs-line));
  background: color-mix(in srgb, #c47a2c 12%, var(--igs-surface, #fff));
  color: #9a5a12;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
}
.igs-shell-station-context__review svg {
  width: 14px;
  height: 14px;
}
.igs-shell-station-context__review:hover {
  background: color-mix(in srgb, #c47a2c 18%, var(--igs-surface, #fff));
}

.igs-shell-station-context__next {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.85rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--igs-accent) 42%, var(--igs-line));
  background: color-mix(in srgb, var(--igs-accent) 14%, var(--igs-surface, #fff));
  color: var(--igs-accent, #2d6a4f);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.igs-shell-station-context__next svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.igs-shell-station-context__next:hover {
  background: color-mix(in srgb, var(--igs-accent) 20%, var(--igs-surface, #fff));
}

.igs-shell-station-context__chknow {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.85rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #5b7c99 35%, var(--igs-line));
  background: color-mix(in srgb, #5b7c99 10%, var(--igs-surface, #fff));
  color: #3d5a73;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
}
.igs-shell-station-context__chknow.is-stale {
  border-color: color-mix(in srgb, #c47a2c 40%, var(--igs-line));
  background: color-mix(in srgb, #c47a2c 10%, var(--igs-surface, #fff));
  color: #9a5a12;
}
.igs-shell-station-context__chknow svg {
  width: 14px;
  height: 14px;
}

.igs-shell-drawer__peek-btn.is-on {
  background: color-mix(in srgb, var(--igs-accent, #2d6a4f) 18%, transparent);
  color: var(--igs-accent, #2d6a4f);
  border-color: color-mix(in srgb, var(--igs-accent, #2d6a4f) 32%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--igs-accent) 18%, transparent);
}

body.igs-ux2-desktop-first .igs-shell-on #panel-overview.active {
  overflow: auto;
  overscroll-behavior: contain;
  height: 100%;
  min-height: 0;
}
body.igs-ux2-desktop-first .igs-shell-on #panel-overview.active > .igs-ux2-continue {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}
body.igs-ux2-desktop-first .igs-shell-on #panel-overview.active {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.igs-shell-chrome-extras {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.igs-shell-chrome-zone {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.igs-shell-chrome-zone--work {
  padding-inline-end: 0.35rem;
  border-inline-end: 1px solid var(--igs-line, rgba(0, 0, 0, 0.08));
}
@media (max-width: 900px) {
  body:not(.igs-ux2-desktop-first) .igs-shell-chrome-zone--work .igs-shell-btn-ico span {
    display: none;
  }
}

.igs-shell-btn-ico {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.igs-shell-btn-ico svg {
  flex-shrink: 0;
  opacity: 0.88;
}
.igs-shell-btn--help {
  color: var(--igs-accent, #2f7d62);
  border-color: color-mix(in srgb, var(--igs-accent, #3d9a7a) 35%, transparent);
}
.igs-shell-btn--help:hover {
  background: color-mix(in srgb, var(--igs-accent, #3d9a7a) 12%, transparent);
}
.igs-shell-btn--icon-only span {
  display: none;
}
.igs-shell-btn--icon-only {
  min-width: 2.15rem;
  padding-inline: 0.45rem;
  justify-content: center;
}


/* —— 快乐壳层：主区氛围 —— */
body.igs .igs-workspace.igs-shell-on {
  background:
    radial-gradient(ellipse 70% 40% at 12% 0%, color-mix(in srgb, var(--igs-bg-a) 55%, transparent), transparent 60%),
    radial-gradient(ellipse 55% 35% at 88% 8%, color-mix(in srgb, var(--igs-bg-b) 50%, transparent), transparent 55%),
    var(--igs-paper, #fff8ef);
}
body.igs .igs-nav .igs-tab.is-on,
body.igs #igsTabs .igs-tab.is-on {
  color: var(--igs-accent);
  box-shadow: inset 0 -2px 0 var(--igs-accent-2, var(--igs-accent));
}
