/* 图片中心拥有独立页头，保留主站导航；大图浮层仍复用同一个 iframe。 */
.handbook-home-tab[data-handbook-tab="image-center"][hidden] {
  display: none !important;
}

body.image-center-active {
  overflow: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
}

html:has(body.image-center-active) {
  overflow: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
}
body.image-center-active::-webkit-scrollbar,
html:has(body.image-center-active)::-webkit-scrollbar { display: none; }

body.image-center-active .container:has(#ai-handbook.active) {
  width: 100%;
  max-width: 1240px;
  /* Match the learning-workshop title's top edge and keep the iframe's own header aligned. */
  padding: 36px 20px 0;
}

body.image-center-active #ai-handbook { --growth-center-inner-width: 1200px; }

body.image-center-active #growth-content-wrap.is-image-center {
  min-height: 0;
  padding: 0;
  background: transparent;
}

body.image-center-active #growth-content-wrap.is-image-center::before,
body.image-center-active #growth-content-wrap.is-image-center::after {
  display: none;
}

body.image-center-active #growth-content-wrap.is-image-center .handbook-home-content-inner {
  width: 100%;
  max-width: var(--growth-center-inner-width, 1344px);
  margin: 0 auto;
  padding: 0;
}

body.image-center-active #image-center-host {
  display: block;
  width: 100%;
  height: max(0px, calc(100dvh - var(--ic-host-top, 130px)));
  margin: 0;
  background: transparent;
}

body.image-center-active #image-center-host .image-center-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Expand the same iframe without reparenting it (moving an iframe reloads its document). */
body.image-center-modal-open #ai-handbook,
body.image-center-modal-open #ai-handbook .handbook-home-layout,
body.image-center-modal-open #growth-content-wrap,
body.image-center-modal-open .handbook-home-content-inner {
  isolation: auto;
  transform: none;
  z-index: auto;
}

body.image-center-modal-open #image-center-host.is-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  z-index: 26000;
}

body.image-center-modal-open #image-center-host .image-center-frame {
  height: 100dvh;
}

@media (max-width: 600px) {
  body.image-center-active .container:has(#ai-handbook.active) {
    padding: 24px 0 0;
  }

  body.image-center-active #growth-content-wrap.is-image-center {
    padding: 0;
  }

  body.image-center-active #image-center-host {
    height: max(0px, calc(100dvh - var(--ic-host-top, 110px)));
  }
}
