/* flex 子项可收缩，脑图区才能吃满剩余高度 */
.min-h-0 {
  min-height: 0;
}

:root {
  --zstp-sky-50: #f0f9ff;
  --zstp-sky-100: #e0f2fe;
  --zstp-sky-200: #bae6fd;
  --zstp-sky-600: #0284c7;
  --zstp-sky-800: #075985;
  --zstp-topbar-h: auto;
  /* 与 .page-bg 一致，供脑图容器 ::before 复用，避免 Mind Elixir 画布盖住 body 底纹 */
  --zstp-page-bg-color: #f3f9fd;
  --zstp-page-bg-image:
    linear-gradient(rgba(14, 165, 233, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.1) 1px, transparent 1px),
    linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.45) 0%,
      rgba(240, 249, 255, 0.35) 45%,
      rgba(224, 242, 254, 0.42) 100%
    ),
    url("/static/img/watermark-tile.svg");
  --zstp-page-bg-size:
    32px 32px,
    32px 32px,
    100% 100%,
    420px 260px;
  --zstp-page-bg-repeat: repeat, repeat, no-repeat, repeat;
  --zstp-page-bg-position: 0 0, 0 0, 0 0, 0 0;
}

html.h-100,
html.h-100 body {
  height: 100%;
}

.page-bg {
  background-color: var(--zstp-page-bg-color);
  background-image: var(--zstp-page-bg-image);
  background-size: var(--zstp-page-bg-size);
  background-repeat: var(--zstp-page-bg-repeat);
  background-position: var(--zstp-page-bg-position);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

/* 高于 .mm-map-full（z-index:2），避免脑图画布盖住顶栏与「导出」下拉 */
.zstp-topbar {
  position: relative;
  z-index: 1020;
}

.zstp-topbar .dropdown-menu {
  z-index: 1030;
}

.zstp-topbar .zstp-topbar-form {
  min-width: 12rem;
  max-width: min(28rem, 100%);
}

.zstp-topbar .zstp-topbar-form .form-control {
  min-width: 0;
}

.zstp-selection {
  max-width: 10rem;
}

@media (min-width: 768px) {
  .zstp-selection {
    max-width: 14rem;
  }
}

/* 主区域：透底，沿用 body 格子 + 水印 */
.zstp-map-shell {
  overflow: hidden;
  background: transparent;
}

.zstp-empty-hint {
  z-index: 3;
  pointer-events: none;
  max-width: 22rem;
}

.mm-map-full {
  height: 100%;
  width: 100%;
  min-height: 0;
  position: relative;
  z-index: 2;
}

/* 画布区内单独铺一层与整页相同的格子+水印（Mind Elixir .map-container 原为不透明底色会盖住 body） */
.mm-map-full::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--zstp-page-bg-color);
  background-image: var(--zstp-page-bg-image);
  background-size: var(--zstp-page-bg-size);
  background-repeat: var(--zstp-page-bg-repeat);
  background-position: var(--zstp-page-bg-position);
}

.mm-map-full .map-container {
  position: relative;
  z-index: 1;
  border-radius: 0;
  background-color: transparent !important;
}

.mm-map-full .map-container #input-box {
  background-color: rgba(255, 255, 255, 0.96) !important;
}

.mm-map-full me-tpc .text {
  max-width: 18rem;
  white-space: normal;
  line-height: 1.35;
}

.zstp-footer {
  line-height: 1.5;
}

@media (max-width: 576px) {
  .mm-map-full me-tpc .text {
    max-width: 12rem;
    font-size: 0.9rem;
  }

  .zstp-topbar-actions .btn {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }
}
