/**
 * 青藤短剧制作台 · 历史手机壳（≤720px）
 * **产品定位（2026-09-03）**：制作台仅电脑端；`html.igs-studio-desktop-only` 时手机规则被 desktop.css 闸门覆盖。
 * 参与者手机请走轻端，勿在本文件扩手机体验。
 */

/* 桌面默认：手机壳 / 窄屏分段条不可见 */
.igs-mnav,
.igs-mmore,
.igs-m-search-toggle,
.igs-mobile-page-title,
.igs-mseg,
.igs-nv-mbar {
  display: none !important;
}

@media (max-width: 720px) {
  :root {
    --igs-mnav-h: calc(3.55rem + env(safe-area-inset-bottom, 0px));
    --igs-dock-h: 5.25rem;
    --igs-dock-safe: calc(var(--igs-dock-h) + 0.85rem);
  }

  /* Studio UX 2.0：壳底栏优先，隐藏旧 .igs-mnav */
  body.igs-shell-on .igs-mnav,
  body.igs-shell-on .igs-mmore {
    display: none !important;
  }
  /* 壳底栏由 shell.css 统一 padding；避免与 #igsWorkspace 叠双层 */
  body.igs-shell-on #igsWorkspace {
    padding-bottom: 0;
  }

  /* —— 顶栏：品牌 + 当前页名；搜索折叠 —— */
  .igs-top,
  .igs-top--slim {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.3rem 0.45rem;
    gap: 0.3rem 0.4rem;
    padding-top: max(0.3rem, env(safe-area-inset-top, 0px));
  }
  .igs-brand {
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
  }
  .igs-mark {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.9rem;
    border-radius: 0.4rem;
  }
  .igs-brand h1,
  .igs-brand #igsBrandTitle {
    display: block;
    font-size: 0.92rem;
  }
  .igs-brand__novel {
    max-width: 42vw;
    font-size: 0.65rem;
  }
  .igs-brand > div > p:not(.igs-mobile-page-title):not(.igs-brand__season) { display: none; }
  .igs-mobile-page-title {
    display: block !important;
    margin: 0;
    font-family: var(--igs-serif);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--igs-ink);
  }
  .igs-pipe-project {
    flex: 1 1 100%;
    max-width: none;
    min-height: 2.4rem;
  }
  body.igs-m-search-open .igs-pipe-project { opacity: 0.55; }
  .igs-pipe-project .igs-project-select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    font-size: 16px;
  }
  .igs-top-actions {
    flex: 0 0 auto;
    gap: 0.25rem;
    justify-content: flex-end;
  }
  .igs-m-search-toggle {
    display: inline-grid !important;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.45rem;
    border: 1px solid var(--igs-line);
    background: var(--igs-card);
    font-size: 1.05rem;
    color: var(--igs-ink);
    cursor: pointer;
  }
  .igs-m-search-toggle.is-on {
    background: rgba(31, 107, 88, 0.12);
    border-color: rgba(31, 107, 88, 0.45);
    color: var(--igs-accent);
  }
  .igs-top-actions > input#igsGlobalSearch {
    display: none;
    flex: 1 1 100%;
    order: 6;
    min-width: 0;
    max-width: none;
    width: 100%;
    min-height: 2.4rem;
    font-size: 16px;
  }
  body.igs-m-search-open .igs-top-actions > input#igsGlobalSearch {
    display: block;
  }
  .igs-account-menu {
    display: inline-block;
    position: relative;
    z-index: 75;
  }
  .igs-account-chip {
    display: inline-flex !important;
    max-width: 7.2rem;
    min-height: 2.35rem;
    font-size: 0.72rem;
    padding: 0.28rem 0.55rem;
  }
  .igs-account-menu__panel {
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    top: auto;
    width: auto;
    min-width: 0;
    max-width: none;
  }
  .igs-top-more > summary {
    min-height: 2.35rem;
    min-width: 2.35rem;
    display: inline-grid;
    place-items: center;
    font-size: 0.78rem;
  }
  .igs-top-more-panel {
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    top: auto;
    width: auto;
    max-width: none;
    z-index: 70;
  }
  .igs-top-more-panel input,
  .igs-top-more-panel select { font-size: 16px; }
  .igs-settings-summary-lab { display: none; }
  body.igs-settings-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(12, 18, 16, 0.45);
  }
  #igsSettingsPanel[open] .igs-top-more-panel.igs-settings-panel {
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    top: auto;
    max-height: min(88vh, 42rem);
    z-index: 72;
    overflow: auto;
    padding: 0.55rem 0.65rem 0.75rem;
  }
  #igsSettingsPanel[open] .igs-settings-panel__hd {
    display: flex;
    margin-bottom: 0.35rem;
  }
  #igsSettingsPanel[open] .igs-settings-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--igs-line);
  }
  #igsSettingsPanel[open] .igs-settings-sec {
    display: none;
  }
  #igsSettingsPanel[open] .igs-settings-sec.is-active {
    display: block;
  }
  #btnSync {
    min-height: 2.35rem;
    padding: 0.3rem 0.55rem;
    font-size: 0.78rem;
  }
  .igs-qa {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    margin: 0;
    max-height: 2.4rem;
    overflow: auto;
  }

  /* —— 隐藏桌面顶栏页签 —— */
  #igsTabs.igs-nav,
  #igsTabs.igs-nav--v2 {
    display: none !important;
  }

  /* —— 手机底栏 —— */
  .igs-mnav {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    height: var(--igs-mnav-h);
    padding: 0.2rem 0.15rem calc(0.2rem + env(safe-area-inset-bottom, 0px));
    gap: 0.1rem;
    background: rgba(20, 32, 28, 0.97);
    color: #f4f0e6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(12px);
  }
  .igs-mnav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    min-width: 0;
    min-height: 2.85rem;
    margin: 0;
    padding: 0.15rem 0.1rem;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: rgba(244, 240, 230, 0.72);
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .igs-mnav-item:active { background: rgba(255, 255, 255, 0.08); }
  .igs-mnav-item.active {
    color: #fff;
    background: rgba(42, 138, 112, 0.35);
  }
  .igs-mnav-item.is-more-active {
    color: #ffd9a8;
    background: rgba(196, 92, 40, 0.28);
  }
  .igs-mnav-ico {
    font-size: 1.05rem;
    line-height: 1;
  }
  .igs-mnav-lab {
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  /* —— 更多抽屉 —— */
  .igs-mmore[hidden] { display: none !important; }
  .igs-mmore:not([hidden]) {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 55;
  }
  .igs-mmore-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(16, 14, 12, 0.45);
    cursor: pointer;
  }
  .igs-mmore-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(78dvh, 88vh);
    display: flex;
    flex-direction: column;
    background: #faf8f4;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -10px 36px rgba(20, 16, 12, 0.22);
    padding: 0.15rem 0.7rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    animation: igsMmoreIn 0.22s ease;
  }
  @keyframes igsMmoreIn {
    from { transform: translateY(12%); opacity: 0.85; }
    to { transform: translateY(0); opacity: 1; }
  }
  .igs-mmore-handle {
    width: 2.6rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(40, 32, 24, 0.22);
    margin: 0.4rem auto 0.35rem;
  }
  .igs-mmore-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    flex: 0 0 auto;
  }
  .igs-mmore-head h2 {
    margin: 0;
    font-family: var(--igs-serif);
    font-size: 1.1rem;
  }
  .igs-mmore-sub {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    color: var(--igs-muted);
  }
  .igs-mmore-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.35rem 0 0.5rem;
  }
  .igs-mmore-g {
    margin: 0 0 0.75rem;
  }
  .igs-mmore-g-lab {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--igs-muted);
    margin: 0 0 0.35rem 0.1rem;
  }
  .igs-mmore-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }
  .igs-mmore-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-height: 3.4rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.55rem;
    border: 1px solid var(--igs-line);
    background: #fff;
    color: var(--igs-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .igs-mmore-item strong {
    font-size: 0.88rem;
  }
  .igs-mmore-item span {
    font-size: 0.65rem;
    color: var(--igs-muted);
  }
  .igs-mmore-item.active {
    border-color: rgba(31, 107, 88, 0.55);
    background: linear-gradient(160deg, #e8f5f0, #fff);
    box-shadow: 0 0 0 2px rgba(31, 107, 88, 0.12);
  }
  html.igs-mmore-open,
  html.igs-mmore-open body {
    overflow: hidden;
  }

  /* —— 主区避让底栏 —— */
  body.igs.igs-on-workspace {
    padding-bottom: 0;
  }
  body.igs-on-workspace .igs-main {
    padding: 0.3rem 0.4rem calc(0.35rem + var(--igs-mnav-h));
  }
  /* 小说进书 / 编剧：仍贴边铺满，只给底栏留白 */
  body.igs-on-workspace:has(#panel-novel.active > .igs-nv-studio) .igs-main,
  body.igs-on-workspace:has(#panel-planning.active > .igs-pl-studio) .igs-main,
  body.igs-on-planning.igs-on-workspace .igs-main {
    padding: 0 0 calc(0.2rem + var(--igs-mnav-h)) !important;
  }
  body.igs-on-episode #panel-episode {
    padding-bottom: calc(var(--igs-dock-safe) + var(--igs-mnav-h));
  }
  .igs-dock {
    bottom: var(--igs-mnav-h);
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding: 0.4rem 0.5rem 0.4rem;
    min-height: 0;
    z-index: 44;
  }
  .igs-dock-meta {
    flex: 0 0 auto;
    max-width: none;
  }
  .igs-dock-meta strong { font-size: 0.92rem; }
  .igs-dock-hint { font-size: 0.66rem; }
  .igs-dock-video-preview {
    max-height: 2.3em;
    font-size: 0.7rem;
  }
  .igs-dock-actions {
    flex: 0 0 auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.28rem;
    scrollbar-width: none;
  }
  .igs-dock-actions::-webkit-scrollbar { display: none; }
  .igs-dock-nav,
  .igs-dock-copy-row,
  .igs-dock-extra {
    flex-wrap: nowrap;
    flex: 0 0 auto;
  }
  .igs-dock .igs-btn,
  .igs-dock .igs-btn-ghost {
    flex: 0 0 auto;
    min-height: 2.45rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }

  /* —— 通用触控 / 表单 —— */
  .igs-ep-toolbar,
  .igs-m-top,
  .igs-refs-ctx-bar,
  .igs-wf-toolbar,
  .igs-clib-toolbar,
  .igs-pl-top,
  .igs-pm-head,
  .igs-bws-head,
  .igs-tools-bar,
  .igs-std-top,
  .igs-vid-toolbar,
  .igs-acad-top,
  .igs-lora-toolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.28rem !important;
    scrollbar-width: none;
  }
  .igs-ep-toolbar::-webkit-scrollbar,
  .igs-m-top::-webkit-scrollbar,
  .igs-refs-ctx-bar::-webkit-scrollbar,
  .igs-bws-head::-webkit-scrollbar {
    display: none;
  }
  .igs-ep-toolbar .igs-btn,
  .igs-ep-toolbar .igs-btn-ghost,
  .igs-m-top .igs-btn,
  .igs-m-top .igs-btn-ghost,
  .igs-refs-ctx-bar .igs-btn,
  .igs-refs-ctx-bar .igs-btn-ghost,
  .igs-pl-top .igs-btn,
  .igs-pl-top .igs-btn-ghost,
  .igs-bws-head .igs-btn,
  .igs-bws-head .igs-btn-ghost {
    flex: 0 0 auto;
    min-height: 2.35rem;
  }
  input[type='text'],
  input[type='search'],
  input[type='password'],
  input[type='email'],
  input[type='number'],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* —— 总览 —— */
  .igs-hub-stats,
  .igs-hub-stats--v3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
  }
  .igs-hub-workflow-grid {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
  }
  .igs-hub-wf-items {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
  }
  .igs-hub-portal { min-height: 3.35rem; }
  .igs-hub-more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .igs-hub-ep-grid {
    grid-template-columns: 1fr !important;
    --igs-hub-ep-min: 100%;
  }
  .igs-hub-hero--cmd {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }
  .igs-hub-hero-actions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.3rem;
    -webkit-overflow-scrolling: touch;
  }
  .igs-hub-hero-actions .igs-btn,
  .igs-hub-hero-actions .igs-btn-ghost {
    flex: 0 0 auto;
    min-height: 2.35rem;
  }

  /* —— 分集：胶片/详情分段（已有 mobile tabs） —— */
  .igs-ep-mobile-tabs {
    display: flex !important;
    position: sticky;
    top: 0;
    z-index: 6;
    gap: 0.25rem;
    padding: 0.25rem 0;
    background: #faf8f4;
  }
  .igs-ep-mobile-tabs button {
    flex: 1 1 0;
    min-height: 2.45rem;
    font-size: 0.82rem;
  }
  #panel-episode .igs-filmstrip,
  #panel-episode .igs-kf-list {
    -webkit-overflow-scrolling: touch;
  }
  #panel-episode .igs-film { min-width: 4.2rem; }

  /* —— 通用手机分段条 —— */
  .igs-mseg {
    display: flex !important;
    position: sticky;
    top: 0;
    z-index: 7;
    gap: 0.25rem;
    padding: 0.25rem 0;
    background: #faf8f4;
    flex: 0 0 auto;
  }
  .igs-mseg-btn {
    flex: 1 1 0;
    min-height: 2.4rem;
    border: 1px solid var(--igs-line);
    border-radius: 0.45rem;
    background: #fff;
    color: var(--igs-ink);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
  }
  .igs-mseg-btn.on {
    background: rgba(31, 107, 88, 0.14);
    border-color: rgba(31, 107, 88, 0.5);
    color: var(--igs-accent);
  }

  /* —— 方案对比 / 全镜：扣底栏高度 —— */
  .igs-scheme-cmp.has-dock {
    height: calc(100dvh - 5.25rem - var(--igs-mnav-h)) !important;
    max-height: calc(100dvh - 5.25rem - var(--igs-mnav-h)) !important;
  }
  .igs-sgal.has-drawer .igs-sgal-grid,
  .igs-sgal-grid {
    padding-bottom: calc(0.75rem + var(--igs-mnav-h));
  }
  .igs-kf-sticky,
  .igs-kf-produce-bar,
  .igs-ep-toolbar--secondary {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  /* —— 母版 —— */
  .igs-m-top { flex-wrap: wrap !important; overflow: visible !important; }
  .igs-m-top-row,
  .igs-m-cats,
  .igs-m-chiprow,
  .igs-m-seg,
  .igs-m-pwin-tools {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.3rem;
    scrollbar-width: none;
  }
  .igs-m-cats::-webkit-scrollbar,
  .igs-m-chiprow::-webkit-scrollbar { display: none; }
  .igs-m-cat,
  .igs-m-tchip,
  .igs-m-pwin-tools .igs-btn,
  .igs-m-pwin-tools .igs-btn-ghost {
    flex: 0 0 auto;
  }
  .igs-m-work--v4 .igs-m-shell,
  .igs-m-work--v5 .igs-m-shell {
    grid-template-columns: 1fr !important;
    overflow: auto;
  }
  .igs-m-rail-resizer { display: none !important; }
  .igs-m-work--v4 .igs-m-rail,
  .igs-m-work--v5 .igs-m-rail {
    max-height: none;
    height: auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.55rem;
  }
  .igs-m-mobile-list .igs-m-main { display: none !important; }
  .igs-m-mobile-canvas .igs-m-rail { display: none !important; }
  .igs-m-mobile-canvas .igs-m-shell { grid-template-columns: 1fr !important; }
  .igs-m-mobile-canvas .igs-m-main {
    min-height: calc(100dvh - 11rem - var(--igs-mnav-h));
  }
  .igs-m-slots-v,
  .igs-m-combo-grid,
  .igs-m-style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* —— 编剧 / 透析 / 站位 / 色标 —— */
  .igs-pl-body,
  .igs-pl-arch,
  .igs-dx-layout,
  .igs-bws-body,
  .igs-pm-body {
    grid-template-columns: 1fr !important;
  }
  .igs-pl-col--sl,
  .igs-pl-col--slate,
  .igs-pl-col--deep,
  .igs-pl-arch-tree,
  .igs-pl-arch-dock-col,
  .igs-dx-cast {
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .igs-pl-arch-mseg-tree .igs-pl-arch-main,
  .igs-pl-arch-mseg-tree .igs-pl-arch-dock-col { display: none !important; }
  .igs-pl-arch-mseg-main .igs-pl-arch-tree,
  .igs-pl-arch-mseg-main .igs-pl-arch-dock-col { display: none !important; }
  .igs-pl-arch-mseg-dock .igs-pl-arch-tree,
  .igs-pl-arch-mseg-dock .igs-pl-arch-main { display: none !important; }
  .igs-pl-arch > .igs-pl-resize,
  .igs-pl-script > .igs-pl-resize,
  .igs-pl-shots > .igs-pl-resize { display: none !important; }
  .igs-pl-arch-mseg-main .igs-pl-arch-main {
    min-height: calc(100dvh - 12rem - var(--igs-mnav-h));
  }
  .igs-pl-script-mseg-docs .igs-pl-script-main { display: none !important; }
  .igs-pl-script-mseg-read .igs-pl-script-rail { display: none !important; }
  .igs-pl-chrome {
    position: sticky;
    top: 0;
  }
  .igs-pl-chrome__meta {
    max-width: 42vw;
  }
  .igs-pl-body-mseg-sl .igs-pl-col--slate,
  .igs-pl-body-mseg-sl .igs-pl-col--deep { display: none !important; }
  .igs-pl-body-mseg-slate .igs-pl-col--sl,
  .igs-pl-body-mseg-slate .igs-pl-col--deep { display: none !important; }
  .igs-pl-body-mseg-deep .igs-pl-col--sl,
  .igs-pl-body-mseg-deep .igs-pl-col--slate { display: none !important; }
  .igs-pl-top {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
  .igs-pl-top-actions,
  .igs-pl-mode-tabs,
  .igs-pl-lights,
  .igs-pl-arch-views {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem;
  }
  .igs-pl-slate-head,
  .igs-pl-slate-row {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
  }
  .igs-pl-slate-head > *,
  .igs-pl-slate-row > * {
    flex: 0 0 auto;
    min-width: 5.5rem;
  }
  .igs-bws-mseg-shots .igs-bws-stage-wrap,
  .igs-bws-mseg-shots .igs-bws-insp { display: none !important; }
  .igs-bws-mseg-stage .igs-bws-shots,
  .igs-bws-mseg-stage .igs-bws-insp { display: none !important; }
  .igs-bws-mseg-insp .igs-bws-shots,
  .igs-bws-mseg-insp .igs-bws-stage-wrap { display: none !important; }
  .igs-bws-mseg-stage .igs-bws-stage-wrap {
    min-height: calc(100dvh - 12rem - var(--igs-mnav-h));
  }
  .igs-bws-mseg-insp .igs-bws-insp {
    max-height: none;
    min-height: calc(100dvh - 12rem - var(--igs-mnav-h));
  }
  .igs-bws-dot {
    min-width: 2.4rem;
    min-height: 2.4rem;
  }
  .igs-pm-mseg-palette .igs-pm-main { display: none !important; }
  .igs-pm-mseg-stage .igs-pm-side { display: none !important; }
  .igs-pm-mseg-stage .igs-pm-stage {
    min-height: calc(100dvh - 14rem - var(--igs-mnav-h));
  }
  .igs-pm-pick {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.35rem;
    -webkit-overflow-scrolling: touch;
  }
  .igs-pm-pick > * { flex: 0 0 auto; }
  .igs-bws-head-acts,
  .igs-bws-mode {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }
  .igs-bws-check {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.72rem;
  }

  /* —— 小说 / 参考 / 任务 / 标准 / LoRA / 成片 / 学院 —— */
  .igs-novel-layout,
  .igs-wf-layout,
  .igs-std-layout,
  .igs-clib-layout,
  .igs-lora-layout,
  .igs-vid-layout,
  .igs-acad-layout,
  .igs-rel-shell,
  .igs-rel-page {
    grid-template-columns: 1fr !important;
  }

  /* —— 小说页 · 书架 / 目录 / 阅读 / 评论 / 写章 —— */
  /* 书架：工作区/面板默认 overflow:hidden 会锁死上下滑 */
  body.igs-on-workspace #panel-novel.active:has(.igs-novel-page--library) {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  body.igs-on-workspace #panel-novel.active:has(.igs-novel-page--reader) {
    overflow: hidden !important;
  }
  body.igs-on-workspace .igs-novel-page--library {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    flex: none !important;
  }
  .igs-nv-library {
    padding: 0.1rem 0 calc(0.85rem + var(--igs-mnav-h));
  }
  .igs-nv-lib-head {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
  }
  .igs-nv-lib-head h2 { font-size: 1.05rem; margin: 0; }
  .igs-nv-lib-head p { display: none; }
  .igs-nv-cards {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  /* 书架卡：左窄封面 + 右文，压高度 */
  .igs-nv-card {
    flex-direction: row !important;
    align-items: stretch;
    border-radius: 0.75rem !important;
    min-height: 0;
  }
  .igs-nv-card:hover { transform: none; }
  .igs-nv-card-cover {
    flex: 0 0 4.75rem;
    width: 4.75rem;
    height: auto !important;
    min-height: 5.6rem;
    align-self: stretch;
  }
  .igs-nv-card-cover__title { display: none; }
  .igs-nv-card-cover__mark {
    top: 0.35rem;
    left: 0.35rem;
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.72rem;
    border-radius: 0.4rem;
  }
  .igs-nv-card-body {
    padding: 0.45rem 0.55rem 0.5rem !important;
    gap: 0.1rem;
  }
  .igs-nv-card-body h3 { font-size: 0.92rem !important; line-height: 1.25; }
  .igs-nv-card-tags { display: none; }
  .igs-nv-author { margin: 0.1rem 0 0 !important; font-size: 0.72rem !important; }
  .igs-nv-sub { display: none; }
  .igs-nv-syn {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0.2rem 0 0.3rem !important;
    font-size: 0.74rem !important;
    line-height: 1.4 !important;
    flex: 0 1 auto !important;
  }
  .igs-nv-prog { margin: 0.15rem 0 0.35rem !important; }
  .igs-nv-prog-row { font-size: 0.65rem !important; }
  .igs-nv-prog-track { height: 4px !important; }
  .igs-nv-card-body footer {
    margin-top: 0.15rem !important;
    gap: 0.3rem;
  }
  .igs-nv-card-body footer > .igs-muted-sm { display: none; }
  .igs-nv-card-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.3rem;
    width: 100%;
  }
  .igs-nv-card-actions .igs-btn {
    flex: 1 1 auto;
    min-height: 2rem;
    font-size: 0.78rem;
    padding: 0.28rem 0.45rem;
    justify-content: center;
  }
  .igs-nv-card-actions .igs-btn-ghost {
    flex: 0 0 auto;
    min-height: 2rem;
    font-size: 0.72rem;
    padding: 0.28rem 0.4rem;
  }
  .igs-nv-library--v2 {
    padding: 0.1rem 0.55rem calc(0.85rem + var(--igs-mnav-h));
  }
  .igs-nv-slim-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .igs-nv-slim-bar__acts {
    justify-content: flex-end;
  }
  .igs-nv-search {
    max-width: none;
  }
  .igs-nv-toolbar--v2 {
    flex-direction: column;
    align-items: stretch;
  }
  .igs-nv-library:not(.igs-nv-library--v2) .igs-nv-shelf {
    grid-template-columns: 1fr !important;
  }
  .igs-nv-book-cover__tools,
  .igs-nv-book-cover__bar {
    opacity: 1;
    pointer-events: auto;
  }
  .igs-nv-book--v2 .igs-nv-book-cover__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.4rem 0.45rem;
  }
  .igs-nv-book-cover-wrap {
    display: flex;
    flex-direction: column;
  }
  .igs-nv-book--v2 .igs-nv-book-primary {
    flex: 1 1 100%;
  }
  .igs-nv-toolbar__hint {
    display: none;
  }

  /* 阅读壳：flex 链滚动，勿用过大的 100dvh max-height（会溢出父级被裁切） */
  body.igs-on-workspace .igs-novel-page--reader,
  body.igs-on-workspace .igs-novel-page--reader .igs-nv-reader-wrap {
    overflow: hidden !important;
    min-height: 0;
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: column;
  }
  .igs-nv-reader-wrap {
    padding-bottom: 0;
    min-height: 0;
  }
  .igs-nv-reader-bar {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 0.3rem;
    padding: 0.2rem 0;
  }
  .igs-nv-reader-meta strong {
    font-size: 0.92rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52vw;
  }
  .igs-nv-reader-meta .igs-muted-sm { display: none; }
  .igs-nv-reader-syn { display: none; }
  .igs-nv-mseg {
    flex: 0 0 auto;
    margin-bottom: 0.3rem;
  }
  .igs-nv-sort {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 0.25rem;
  }
  .igs-nv-sort__btn { flex: 0 0 auto; min-height: 1.9rem; font-size: 0.72rem; padding: 0.2rem 0.45rem; }
  .igs-novel-layout--cards,
  .igs-novel-layout--cards.has-reader {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    gap: 0.4rem;
    overflow: hidden !important;
  }
  .igs-nv-ch-panel,
  .igs-novel-reader {
    max-height: none !important;
    min-height: 0 !important;
  }
  /* 目录：章节列表在 flex 区内滚 */
  .igs-nv-mobile-toc .igs-novel-reader { display: none !important; }
  .igs-nv-mobile-toc .igs-nv-mbar { display: none !important; }
  .igs-nv-mobile-toc .igs-nv-ch-panel {
    flex: 1 1 auto !important;
    max-height: none !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 0.35rem;
  }
  .igs-nv-mobile-toc .igs-nv-ch-cards {
    grid-template-columns: 1fr !important;
    gap: 0.35rem !important;
  }
  .igs-nv-mobile-toc .igs-nv-add-ch {
    margin-top: 0.5rem;
    padding-top: 0.45rem;
  }
  /* 章节卡：紧凑行 */
  .igs-nv-ch-card {
    min-height: 0 !important;
    padding: 0.42rem 0.55rem !important;
    gap: 0.12rem !important;
    border-radius: 0.5rem !important;
  }
  .igs-nv-ch-card:hover { transform: none; }
  .igs-nv-ch-card__title {
    font-size: 0.86rem !important;
    line-height: 1.3 !important;
  }
  .igs-nv-ch-card__id { font-size: 0.66rem !important; }
  .igs-nv-ch-card__heat { font-size: 0.66rem !important; }
  .igs-nv-ch-card__meta {
    font-size: 0.66rem !important;
    gap: 0.25rem 0.45rem !important;
  }
  /* 阅读 */
  .igs-nv-mobile-read .igs-nv-ch-panel { display: none !important; }
  .igs-nv-mobile-read .igs-nv-comments { display: none !important; }
  .igs-nv-mobile-read .igs-nv-ch-nav { display: none !important; }
  .igs-nv-mobile-read .igs-nv-sort { display: none !important; }
  .igs-nv-mobile-read .igs-nv-cands {
    display: block !important;
    margin: 0.55rem 0 0.85rem;
    max-height: none;
  }
  .igs-nv-mobile-read .igs-novel-reader {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.75rem 0.85rem calc(3.6rem + 0.4rem);
    border-radius: 0.6rem;
  }
  .igs-nv-mobile-read .igs-novel-reader-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: linear-gradient(180deg, #fffdf8 70%, rgba(255,253,248,0));
    padding-bottom: 0.3rem;
  }
  .igs-nv-mobile-read .igs-nv-read-know-top {
    position: sticky;
    top: 2.6rem;
    z-index: 2;
    margin: 0 0 0.55rem;
    padding: 0.4rem 0.45rem;
    background: #fffdf8;
    box-shadow: 0 4px 12px rgba(40, 50, 42, 0.06);
  }
  .igs-nv-mobile-read .igs-nv-read-know-top__tabs {
    width: 100%;
    order: 5;
  }
  .igs-nv-mobile-read .igs-nv-read-know-top__meta {
    order: 3;
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
  }
  .igs-nv-mobile-read .igs-nv-read-know-tab {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }
  .igs-nv-mobile-read .igs-nv-read-know-top__acts {
    width: 100%;
    order: 4;
    justify-content: stretch;
  }
  .igs-nv-mobile-read .igs-nv-read-know-top__acts .igs-btn,
  .igs-nv-mobile-read .igs-nv-read-know-top__acts .igs-btn-ghost {
    flex: 1 1 auto;
    min-width: 0;
  }
  .igs-nv-mobile-read .igs-novel-reader-head h2 { font-size: 1.12rem; }
  .igs-nv-mobile-read .igs-novel-reader-head__actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .igs-nv-mobile-read .igs-novel-body,
  .igs-nv-mobile-read .igs-nv-reader-prose {
    font-size: calc(1.08rem * var(--igs-std-fs, 1));
    line-height: calc(1.95 + 0.08 * (var(--igs-std-fs, 1) - 1));
    letter-spacing: 0.02em;
  }
  .igs-nv-mobile-read .igs-nv-ch-overview {
    margin: 0 0 0.65rem;
    font-size: 0.84rem;
  }
  .igs-nv-mobile-read .igs-nv-ch-overview__acts {
    flex-direction: column;
    align-items: stretch;
  }
  .igs-nv-mobile-read .igs-nv-ch-overview__acts .igs-btn-ghost {
    width: 100%;
    justify-content: center;
  }
  .igs-nv-mobile-read .igs-nv-know-dock {
    margin: 0 0 0.65rem;
    border-radius: 10px;
  }
  .igs-nv-mobile-read .igs-nv-know-dock__head {
    flex-direction: column;
    align-items: stretch;
  }
  .igs-nv-mobile-read .igs-nv-know-dock__acts {
    width: 100%;
    justify-content: stretch;
  }
  .igs-nv-mobile-read .igs-nv-know-dock__acts .igs-btn,
  .igs-nv-mobile-read .igs-nv-know-dock__acts .igs-btn-ghost {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.78rem;
  }
  .igs-nv-mobile-read .igs-nv-know-tab {
    padding: 0.5rem 0.45rem;
  }
  .igs-nv-mobile-read .igs-nv-know-tab__body em {
    display: none;
  }
  .igs-nv-mobile-read .igs-nv-know-panel {
    max-height: 38vh;
  }
  .igs-nv-mobile-read .igs-nv-know-empty__guide {
    grid-template-columns: 1fr;
  }
  .igs-nv-mobile-read .igs-nv-know-cards {
    grid-template-columns: 1fr;
  }
  .igs-nv-mobile-read .igs-nv-ch-map-panel {
    margin-bottom: 0.5rem;
  }
  .igs-nv-mobile-read .igs-nv-ch-map-filters {
    width: 100%;
  }
  .igs-nv-mobile-read .igs-nv-ch-map-filter {
    flex: 1;
    text-align: center;
  }
  .igs-nv-ch-know-modal.is-wide {
    width: 100%;
    max-height: 92vh;
    border-radius: 12px 12px 0 0;
  }
  .igs-nv-ch-know-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .igs-nv-know-cast-grid {
    grid-template-columns: 1fr 1fr;
  }
  .igs-nv-know-place-grid {
    grid-template-columns: 1fr;
  }
  .igs-nv-mbar {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--igs-mnav-h);
    z-index: 43;
    gap: 0.25rem;
    padding: 0.3rem 0.4rem;
    background: rgba(20, 32, 28, 0.94);
    border-top: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
  }
  .igs-nv-mobile-toc .igs-nv-mbar,
  .igs-nv-mobile-write .igs-nv-mbar,
  .igs-nv-mobile-comments .igs-nv-mbar {
    display: none !important;
  }
  .igs-nv-mbar .igs-btn-ghost {
    flex: 1 1 0;
    min-height: 2.35rem;
    color: #f4f0e6;
    border-color: rgba(255,255,255,0.28);
    font-size: 0.76rem;
    padding: 0.28rem 0.2rem;
  }
  .igs-nv-mbar .igs-btn-ghost:disabled { opacity: 0.35; }
  /* 评论 */
  .igs-nv-mobile-comments .igs-nv-ch-panel { display: none !important; }
  .igs-nv-mobile-comments .igs-nv-sort { display: none !important; }
  .igs-nv-mobile-comments .igs-novel-reader-head,
  .igs-nv-mobile-comments .igs-novel-meta,
  .igs-nv-mobile-comments .igs-novel-body,
  .igs-nv-mobile-comments .igs-nv-ch-nav {
    display: none !important;
  }
  .igs-nv-mobile-comments .igs-novel-reader {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    padding: 0.5rem 0.55rem;
  }
  .igs-nv-mobile-comments .igs-nv-comments {
    margin: 0;
    padding: 0;
    border: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .igs-nv-mobile-comments .igs-nv-cmt-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 0.4rem;
  }
  .igs-nv-mobile-comments .igs-nv-cmt-form {
    position: sticky;
    bottom: 0;
    flex: 0 0 auto;
    padding: 0.45rem 0 0.15rem;
    background: linear-gradient(180deg, rgba(247,241,228,0) 0%, #f7f1e4 22%);
  }
  .igs-nv-mobile-comments .igs-nv-cmt-form textarea {
    min-height: 4.5rem;
    font-size: 16px !important;
  }
  .igs-nv-cmt-item { padding: 0.55rem 0.65rem; }
  .igs-nv-cmt-item p { font-size: 0.92rem; line-height: 1.55; }
  /* 写章：整壳滚动，避免表单被裁 */
  .igs-nv-mobile-write {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .igs-nv-mobile-write .igs-novel-layout {
    overflow: visible !important;
    flex: none !important;
    height: auto !important;
  }
  .igs-nv-mobile-write .igs-novel-reader { display: none !important; }
  .igs-nv-mobile-write .igs-nv-ch-cards,
  .igs-nv-mobile-write .igs-nv-ch-panel__head,
  .igs-nv-mobile-write .igs-nv-sort { display: none !important; }
  .igs-nv-mobile-write .igs-nv-ch-panel {
    max-height: none !important;
    overflow: visible !important;
    border: 0;
    background: transparent;
    padding: 0;
  }
  .igs-nv-mobile-write .igs-nv-add-ch {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .igs-nv-mobile-write .igs-nv-add-ch > summary { display: none; }
  .igs-nv-mobile-write .igs-nv-add-ch__form {
    display: flex !important;
    gap: 0.45rem;
    padding: 0.1rem 0 calc(0.65rem + var(--igs-mnav-h));
  }
  .igs-nv-mobile-write .igs-nv-add-ch__body {
    min-height: 12rem;
    font-size: 1rem;
    line-height: 1.8;
  }
  .igs-nv-mobile-write .igs-nv-add-ch__actions {
    position: sticky;
    bottom: 0.15rem;
    background: linear-gradient(180deg, transparent, #faf8f4 35%);
    padding: 0.45rem 0 0.15rem;
    justify-content: stretch;
  }
  .igs-nv-mobile-write .igs-nv-add-ch__actions .igs-btn {
    flex: 1 1 auto;
    min-height: 2.45rem;
  }

  /* —— 全站：列表型面板解除 overflow:hidden 锁滚（总览除外：须工作区铺满） —— */
  body.igs-on-workspace #panel-dialysis.active,
  body.igs-on-workspace #panel-refsLib.active,
  body.igs-on-workspace #panel-castLib.active,
  body.igs-on-workspace #panel-standards.active,
  body.igs-on-workspace #panel-lora.active,
  body.igs-on-workspace #panel-videos.active,
  body.igs-on-workspace #panel-academy.active,
  body.igs-on-workspace #panel-graph.active,
  body.igs-on-workspace #panel-relations.active,
  body.igs-on-workspace #panel-sync.active,
  body.igs-on-workspace #panel-teamTasks.active,
  body.igs-on-workspace #panel-myTasks.active {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  body.igs-on-workspace #panel-dialysis.active > .igs-dx-page,
  body.igs-on-workspace #panel-refsLib.active > .igs-refs-lib,
  body.igs-on-workspace #panel-castLib.active > .igs-clib-page,
  body.igs-on-workspace #panel-standards.active > .igs-std-page,
  body.igs-on-workspace #panel-lora.active > .igs-lora-page,
  body.igs-on-workspace #panel-videos.active > .igs-vid-page,
  body.igs-on-workspace #panel-academy.active > .igs-acad-page,
  body.igs-on-workspace #panel-graph.active > .igs-graph-page,
  body.igs-on-workspace #panel-relations.active > .igs-rel-page,
  body.igs-on-workspace #panel-sync.active > .igs-sync-page,
  body.igs-on-workspace #panel-teamTasks.active > .igs-wf-page,
  body.igs-on-workspace #panel-myTasks.active > .igs-wf-page {
    height: auto !important;
    max-height: none !important;
    flex: none !important;
    overflow: visible !important;
    min-height: 0 !important;
    padding-bottom: calc(0.75rem + var(--igs-mnav-h));
  }

  body.igs-on-workspace #panel-mediaHub.active {
    overflow: hidden !important;
  }
  body.igs-on-workspace #panel-mediaHub.active > .igs-mhub-studio--fill {
    height: 100% !important;
    max-height: none !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: calc(0.35rem + var(--igs-mnav-h));
    box-sizing: border-box;
  }

  /* 总览 · 工作区铺满：面板内滚动，勿整页塌成 auto 高度 */
  body.igs-on-workspace #panel-overview.active {
    overflow: hidden !important;
  }
  body.igs-on-workspace #panel-overview.active > .igs-hub.igs-hub--fill,
  body.igs-on-workspace #panel-overview.active > .igs-dash.igs-dash--fill {
    height: 100% !important;
    max-height: none !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: calc(0.35rem + var(--igs-mnav-h));
    box-sizing: border-box;
  }
  body.igs-on-workspace #panel-overview.active .igs-dash-body {
    grid-template-columns: 1fr !important;
    overflow: auto !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-dash-hero {
    padding: 0.65rem 0.75rem !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-dash-hero__title {
    font-size: 1.25rem !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-dash-metrics--primary,
  body.igs-on-workspace #panel-overview.active .igs-dash-metrics--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-dash-grid {
    grid-template-columns: 1fr !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-dash-chain {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-dash-ep-grid {
    max-height: none !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-hub-chrome {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-hub--scroll-fill .igs-hub-cont-grid {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-hub--scroll-fill .igs-hub-ch-list {
    max-height: none !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-hub-eps {
    flex: 1 1 auto !important;
    max-height: none !important;
    min-height: 6.5rem !important;
    overflow: hidden !important;
  }
  body.igs-on-workspace #panel-overview.active .igs-hub-ep-grid {
    max-height: none !important;
    overflow: auto !important;
  }

  /* 其他 hub 子块（非总览 panel 内）保持可滑 */
  .igs-hub-ep-grid {
    max-height: none !important;
    overflow: visible !important;
    flex: none !important;
  }
  .igs-hub-portal {
    min-height: 0 !important;
    padding: 0.45rem 0.5rem !important;
  }
  .igs-hub-portal-body {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .igs-hub-ep {
    padding: 0.45rem 0.55rem !important;
  }
  .igs-hub-ep-blurb {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.74rem !important;
  }
  .igs-hub-tl {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    gap: 0.35rem;
    -webkit-overflow-scrolling: touch;
  }
  .igs-hub-tl .igs-tl-ep { scroll-snap-align: start; flex: 0 0 auto; }

  /* 任务 */
  .igs-wf-mobile-list .igs-wf-detail { display: none !important; }
  .igs-wf-mobile-detail .igs-wf-list { display: none !important; }
  .igs-wf-mobile-detail .igs-wf-detail {
    min-height: 0;
    overflow: visible !important;
  }
  .igs-wf-detail .igs-wf-actions {
    position: sticky;
    bottom: calc(var(--igs-mnav-h) + 0.35rem);
    z-index: 3;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.3rem;
    padding: 0.4rem 0;
    background: linear-gradient(180deg, transparent, #faf8f4 28%);
  }
  .igs-wf-list .igs-card,
  .igs-wf-task-card {
    padding: 0.55rem 0.65rem !important;
  }

  /* 参考图库：压封面 + 整页滑 */
  .igs-refs-lib-grid.is-lobby,
  .igs-refs-lib-grid,
  .igs-refs-lib-grid.is-workbench {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    flex: none !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
  .igs-refs-ep-rail {
    max-height: 8.5rem !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    flex: 0 0 auto !important;
  }
  .igs-refs-lib-cards,
  #refsLibCards {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.3rem !important;
    overflow: visible !important;
    flex: none !important;
    padding: 0.3rem 0 0.6rem !important;
  }
  .igs-refs-lib-cards.density-large,
  .igs-refs-lib-cards.density-comfortable {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .igs-refs-lib-cards .igs-refs-card-thumb,
  .igs-refs-lib-cards.fit-cover .igs-refs-card-thumb {
    aspect-ratio: 3 / 4 !important;
    max-height: 7.2rem !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .igs-refs-lib-cards.fit-contain .igs-refs-card-thumb {
    aspect-ratio: 3 / 4 !important;
    min-height: 4.2rem !important;
    max-height: 7.2rem !important;
    overflow: hidden !important;
  }
  .igs-refs-lib-cards.fit-contain .igs-refs-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
  }
  .igs-refs-lib-cards .igs-refs-card-body {
    display: none !important;
  }
  .igs-refs-lib-cards .igs-refs-card-actions {
    opacity: 1;
  }
  .igs-refs-lib-head p { display: none; }
  .igs-refs-stats {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem;
  }
  .igs-refs-stat { flex: 0 0 auto; font-size: 0.68rem; }
  .igs-refs-novel-rail,
  .igs-refs-ep-list,
  .igs-refs-shot-chips,
  .igs-refs-toolbar,
  .igs-refs-kind-chips,
  .igs-refs-style-chips,
  .igs-refs-group-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.3rem;
    scrollbar-width: none;
  }
  .igs-refs-novel,
  .igs-refs-ep,
  .igs-refs-shot-chips .igs-chip {
    flex: 0 0 auto;
  }
  .igs-refs-batch-bar {
    position: sticky;
    bottom: calc(var(--igs-mnav-h) + 0.25rem);
    z-index: 4;
    background: rgba(250, 248, 244, 0.96);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.2rem;
  }

  /* 透析 · 分段 */
  .igs-dx-explain { display: none; }
  .igs-dx-oneliner {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .igs-dx-stats {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    font-size: 0.72rem;
  }
  .igs-dx-stats span { flex: 0 0 auto; }
  .igs-dx-layout {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .igs-dx-mseg-cast .igs-dx-stage,
  .igs-dx-mseg-cast .igs-dx-side { display: none !important; }
  .igs-dx-mseg-stage .igs-dx-cast,
  .igs-dx-mseg-stage .igs-dx-side { display: none !important; }
  .igs-dx-mseg-side .igs-dx-cast,
  .igs-dx-mseg-side .igs-dx-stage { display: none !important; }
  .igs-dx-cast,
  .igs-dx-stage,
  .igs-dx-side {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
  }
  .igs-dx-cast-btn {
    padding: 0.45rem 0.55rem !important;
  }
  .igs-dx-canvas {
    min-height: 16rem;
  }

  /* 资料库 · 名单/详情 */
  .igs-clib-page .igs-page-head p { display: none; }
  .igs-clib-layout {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .igs-clib-mobile-list .igs-clib-detail { display: none !important; }
  .igs-clib-mobile-detail .igs-clib-grid { display: none !important; }
  .igs-clib-grid {
    max-height: none !important;
    overflow: visible !important;
    gap: 0.4rem !important;
  }
  .igs-clib-card {
    grid-template-columns: 3.2rem 1fr !important;
    gap: 0.45rem !important;
    padding: 0.4rem !important;
  }
  .igs-clib-card:hover { transform: none; }
  .igs-clib-body p,
  .igs-clib-body .tags { display: none !important; }
  .igs-clib-body b { font-size: 0.9rem !important; }
  .igs-clib-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
  }
  .igs-clib-slot-media {
    max-height: 8.5rem;
    overflow: hidden;
  }

  /* 标准 · 目录/正文 */
  .igs-std-page .igs-page-head p { display: none; }
  .igs-std-flow { display: none; }
  .igs-std-layout {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .igs-std-mobile-nav .igs-std-reader { display: none !important; }
  .igs-std-mobile-reader .igs-std-nav { display: none !important; }
  .igs-std-nav,
  .igs-std-reader {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
  }
  .igs-std-styles {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.3rem;
    max-height: none;
  }
  .igs-std-style { flex: 0 0 auto; min-width: 7.5rem; padding: 0.4rem 0.5rem; }
  .igs-std-doc {
    padding: 0.4rem 0.5rem !important;
  }

  /* LoRA · 列表/详情 */
  .igs-lora-layout {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .igs-lora-mobile-list .igs-lora-main { display: none !important; }
  .igs-lora-mobile-detail .igs-lora-side { display: none !important; }
  .igs-lora-side,
  .igs-lora-main {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
  }
  .igs-lora-ds {
    padding: 0.45rem 0.55rem !important;
  }
  .igs-lora-ds small { font-size: 0.68rem; }

  /* 学院 · 目录/课文 */
  .igs-acad-layout {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .igs-acad-mobile-nav .igs-acad-main { display: none !important; }
  .igs-acad-mobile-reader .igs-acad-nav { display: none !important; }
  .igs-acad-nav,
  .igs-acad-main,
  .igs-acad-reader {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
  }
  .igs-acad-ch { padding: 0.4rem 0.5rem !important; }

  /* 成片 */
  .igs-vid-layout {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .igs-vid-grid.igs-grid,
  #panel-videos .igs-grid,
  .igs-vid-grid {
    grid-template-columns: 1fr !important;
    gap: 0.45rem !important;
  }
  .igs-vid-card video {
    max-height: 11rem !important;
    width: 100%;
  }

  /* 关联 / 关系 */
  .igs-matrix-wrap,
  .igs-assoc-flow {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .igs-matrix { font-size: 0.72rem; }
  .igs-rel-page,
  .igs-rel-shell {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }
  .igs-rel-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    max-height: none !important;
  }
  .igs-rel-nav-group {
    flex: 0 0 auto;
    min-width: 8.5rem;
  }
  .igs-rel-canvas { min-height: 15rem; }

  /* 工具箱 */
  .igs-tools-bar {
    padding: 0.3rem 0.35rem;
  }
  .igs-tools-bar-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }
  .igs-tools-chip {
    flex: 0 0 auto;
    min-height: 2.2rem;
  }
  .igs-tools-frame,
  .igs-tools-shell iframe {
    min-height: calc(100dvh - 12.5rem - var(--igs-mnav-h));
    height: calc(100dvh - 12.5rem - var(--igs-mnav-h));
  }

  /* 灯箱 / 弹层 */
  .igs-lightbox-stage {
    grid-template-columns: 1fr !important;
    padding: 0.35rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  }
  .igs-lightbox-panel {
    max-height: 34vh;
    overflow: auto;
  }
  .igs-lightbox-nav button {
    min-width: 2.6rem;
    min-height: 2.6rem;
  }
  .igs-modal-sheet,
  .igs-prompt-modal .igs-modal-sheet {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: min(92dvh, 95vh);
    border-radius: 1rem 1rem 0 0;
    margin: 0;
  }

  /* 登录台 */
  .igs-login-gate {
    padding: 0.85rem 0.75rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  .igs-login-gate__stage {
    padding: 0;
    gap: 1.1rem;
    width: min(100%, 30rem);
  }
  .igs-login-gate__shell {
    gap: 1.15rem;
  }
  .igs-login-gate__title { font-size: clamp(2rem, 9vw, 2.65rem); }
  .igs-login-gate__mark {
    width: 3.85rem;
    height: 3.85rem;
    font-size: 1.6rem;
  }
  .igs-login-gate__scraps {
    display: block;
  }
  .igs-login-gate--v2 .igs-login-gate__scrap--sticker.igs-login-gate__scrap--e,
  .igs-login-gate--v2 .igs-login-gate__scrap--orb.igs-login-gate__scrap--e {
    left: 34%;
    top: 4%;
  }
  .igs-login-gate__vine { opacity: 0.35; }
  .igs-login-gate__card {
    width: 100%;
    padding: 1.35rem 1.2rem 1.15rem;
    border-radius: 1.15rem;
  }
  .igs-login-gate__field input {
    min-height: 2.85rem;
    font-size: 1rem;
  }
  .igs-login-gate__quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }
  .igs-login-gate__chip,
  .igs-login-gate__submit { min-height: 2.6rem; }

  /* 同步 / 成片页边距 */
  .igs-sync-page,
  .igs-vid-page { padding: 0.35rem; }
  .igs-sync-log {
    max-height: 45vh;
    font-size: 0.75rem;
  }

  /* 页头说明在手机收短 */
  .igs-page-head p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.78rem;
  }
  .igs-page-head h2 { font-size: 1.1rem; }
}

@media (max-width: 900px) and (max-height: 480px) {
  .igs-mnav-lab { font-size: 0.58rem; }
  .igs-tools-frame,
  .igs-tools-shell iframe {
    min-height: calc(100dvh - 9rem);
    height: calc(100dvh - 9rem);
  }
}
