/* ============================================================
   朝圣仙门 · 山门全图（sect-map）
   底图：黄公望《富春山居图》无用师卷局部（公有领域，PD-Art）
   建筑与装饰：内联淡彩 SVG（sect-map-art.js）
   ============================================================ */

body.sect .sect-map {
  position: relative;
  margin: 0 0 26px;
}

/* ---------- 图框 ---------- */
body.sect .sect-map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2.2 / 1;
  background: var(--paper-2);
  border: 1px solid var(--line-gold);
  border-radius: 3px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
}
body.sect .sect-map-frame::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(154, 116, 40, .18);
  border-radius: 1px;
  pointer-events: none;
  z-index: 110;
}

/* ---------- 画心 ---------- */
body.sect .sect-map-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  opacity: 1;
  filter: saturate(.93) contrast(1.06) brightness(.985);
  mix-blend-mode: multiply;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}
body.sect .sect-map-wash {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(107, 132, 116, .045), transparent 34%, rgba(107, 132, 116, .02)),
    radial-gradient(38% 52% at 50% 43%, rgba(247, 243, 233, .12), transparent 72%),
    radial-gradient(80% 60% at 78% 24%, rgba(247, 243, 233, .05), transparent 70%),
    linear-gradient(180deg, rgba(247, 243, 233, .12), transparent 15%, transparent 78%, rgba(239, 232, 217, .20));
}

/* ---------- 标题 ---------- */
body.sect .sect-map-title {
  position: absolute;
  left: clamp(16px, 2.2cqw, 32px);
  top: clamp(14px, 2cqw, 28px);
  z-index: 120;
  pointer-events: none;
  max-width: 34%;
}
body.sect .sect-map-kicker {
  font-family: var(--font-mono);
  font-size: clamp(9px, .7cqw, 11px);
  letter-spacing: .2em;
  color: var(--gold-deep);
  opacity: .9;
}
body.sect .sect-map-heading {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.3cqw, 50px);
  line-height: 1;
  letter-spacing: .1em;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(247, 243, 233, .85), 0 0 18px rgba(247, 243, 233, .6);
}
body.sect .sect-map-heading em {
  font-style: normal;
  color: var(--gold-deep);
}
body.sect .sect-map-poem {
  margin: 8px 0 0;
  font-family: var(--font-kai);
  font-size: clamp(11px, .95cqw, 14px);
  line-height: 1.7;
  color: var(--ink-2);
  text-shadow: 0 1px 0 rgba(247, 243, 233, .8);
}
body.sect .sect-map-poem span {
  display: block;
  font-size: .82em;
  color: var(--ink-3);
}

/* ---------- 右上今日数据 ---------- */
body.sect .sect-map-stats {
  position: absolute;
  right: clamp(14px, 1.8cqw, 26px);
  top: clamp(14px, 1.8cqw, 24px);
  z-index: 120;
  display: flex;
  gap: clamp(10px, 1.4cqw, 24px);
  padding: 8px clamp(10px, 1.1cqw, 16px);
  background: rgba(247, 243, 233, .80);
  border: 1px solid rgba(154, 116, 40, .26);
  box-shadow: 0 10px 26px -20px rgba(46, 38, 22, .55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
body.sect .sect-map-stat .k {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(8px, .62cqw, 10px);
  letter-spacing: .12em;
  color: var(--ink-3);
  white-space: nowrap;
}
body.sect .sect-map-stat .v {
  display: block;
  margin-top: 1px;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.2cqw, 18px);
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
}
body.sect .sect-map-stat .v small {
  margin-left: 2px;
  font-family: var(--font-body);
  font-size: .55em;
  color: var(--ink-3);
}

/* ---------- 右下修为玉简 ---------- */
body.sect .sect-map-hud {
  position: absolute;
  right: clamp(14px, 1.8cqw, 26px);
  bottom: clamp(14px, 1.6cqw, 22px);
  z-index: 120;
  width: clamp(196px, 19.2cqw, 242px);
  display: flex;
  gap: 9px;
  padding: 9px 11px;
  background: linear-gradient(135deg, rgba(251, 248, 241, .985), rgba(240, 233, 220, .975));
  border: 1px solid var(--line-gold);
  box-shadow: 0 14px 32px -22px rgba(46, 38, 22, .6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
body.sect .sect-map-hud-seal {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--cinnabar);
  color: #f8eedb;
  font-family: var(--font-kai);
  font-size: 20px;
  line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(248, 238, 219, .18);
}
body.sect .sect-map-hud-body {
  flex: 1;
  min-width: 0;
}
body.sect .sect-map-hud-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .18em;
  color: var(--ink-3);
}
body.sect .sect-map-hud-realm {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.25cqw, 19px);
  line-height: 1.2;
  color: var(--ink);
}
body.sect .sect-map-hud-qi {
  margin-top: 3px;
  font-family: var(--font-body);
  font-size: 10.5px;
  color: var(--ink-2);
}
body.sect .sect-map-hud-qi b {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold-deep);
}
body.sect .sect-map-qi-bar {
  height: 3px;
  margin-top: 5px;
  background: rgba(31, 37, 44, .10);
  overflow: hidden;
}
body.sect .sect-map-qi-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-soft), var(--cinnabar));
  transition: width .5s ease;
}
body.sect .sect-map-hud-break {
  margin-top: 8px;
}
body.sect .sect-map-hud-break .sect-btn {
  width: 100%;
  padding: 5px 8px;
  font-size: 10.5px;
  letter-spacing: .06em;
}
body.sect .sect-map-hud-break .sect-can-break {
  animation: sm-break-pulse 2.6s ease-in-out infinite;
}
@keyframes sm-break-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(172, 58, 43, .18); }
  50% { box-shadow: 0 0 0 5px rgba(172, 58, 43, 0); }
}

/* ---------- 太极 / 红日 / 装饰 ---------- */
body.sect .sect-map-taiji {
  position: absolute;
  left: 50%;
  top: 1.4%;
  width: clamp(78px, 9.4cqw, 120px);
  transform: translateX(-50%);
  z-index: 3;
  opacity: .38;
  filter: drop-shadow(0 0 20px rgba(200, 165, 92, .18));
  pointer-events: none;
  animation: sm-taiji-turn 90s linear infinite;
}
body.sect .sect-map-taiji svg {
  display: block;
  width: 100%;
  height: auto;
}
@keyframes sm-taiji-turn {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}
body.sect .sect-map-sun {
  position: absolute;
  left: 66.5%;
  top: 7%;
  width: clamp(36px, 4.4cqw, 60px);
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 38% 34%, #db8b65, #b95038 62%, #a24230);
  opacity: .40;
  filter: blur(.5px);
  mix-blend-mode: multiply;
}
body.sect .sect-map-whisk,
body.sect .sect-map-gourd,
body.sect .sect-map-ox {
  position: absolute;
  z-index: 6;
  pointer-events: none;
}
body.sect .sect-map-whisk {
  left: 11.2%;
  top: 53%;
  width: clamp(30px, 3.9cqw, 52px);
  opacity: .82;
  transform: rotate(12deg);
  transform-origin: 50% 8%;
}
body.sect .sect-map-gourd {
  left: 40%;
  top: 82.5%;
  width: clamp(22px, 2.5cqw, 34px);
  opacity: .92;
}
body.sect .sect-map-ox {
  left: 58.5%;
  top: 83%;
  width: clamp(38px, 4.5cqw, 58px);
  opacity: .78;
}
body.sect .sect-map-whisk svg,
body.sect .sect-map-gourd svg,
body.sect .sect-map-ox svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
body.sect .sect-map-credit {
  position: absolute;
  left: clamp(14px, 1.8cqw, 26px);
  bottom: clamp(10px, 1.2cqw, 18px);
  z-index: 8;
  font-family: var(--font-kai);
  font-size: clamp(9px, .72cqw, 11px);
  letter-spacing: .04em;
  color: var(--ink-3);
  opacity: .75;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(247, 243, 233, .8);
}

/* ---------- 七域节点 ---------- */
body.sect .sect-map-nodes {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
body.sect .sect-node {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
body.sect .sect-node:hover,
body.sect .sect-node:focus-visible {
  z-index: 99 !important;
}
body.sect .sect-node::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1.5%;
  width: 96%;
  height: 10.5%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 52%, rgba(34, 42, 36, .19), rgba(34, 42, 36, .06) 56%, transparent 78%);
  filter: blur(6px);
  pointer-events: none;
  z-index: -1;
}
body.sect .sect-node-art {
  display: block;
  width: 100%;
  opacity: .93;
  mix-blend-mode: multiply;
  filter: grayscale(.38) sepia(.2) saturate(.5) contrast(.94) brightness(1.01) drop-shadow(0 8px 9px rgba(42, 45, 35, .19));
  transition: transform .32s cubic-bezier(.2, .7, .2, 1), filter .32s ease, opacity .32s ease;
  transform-origin: 50% 100%;
}
body.sect .sect-node-art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
body.sect .sect-node:hover .sect-node-art,
body.sect .sect-node:focus-visible .sect-node-art {
  transform: translateY(-8px) scale(1.03);
  opacity: 1;
  filter: grayscale(.22) sepia(.12) saturate(.7) contrast(.96) drop-shadow(0 0 14px rgba(200, 165, 92, .40)) drop-shadow(0 16px 14px rgba(42, 45, 35, .24)) brightness(1.03);
}
body.sect .sect-node.is-active .sect-node-art {
  opacity: 1;
  filter: grayscale(.24) sepia(.12) saturate(.68) contrast(.96) drop-shadow(0 0 10px rgba(200, 165, 92, .40)) drop-shadow(0 12px 12px rgba(42, 45, 35, .24));
}

/* 匾额 */
body.sect .sect-node-plaque {
  position: absolute;
  top: 30%;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 3px;
  background: linear-gradient(180deg, #272d29, #161b18);
  border: 1px solid rgba(176, 138, 69, .58);
  box-shadow: 0 7px 16px -8px rgba(20, 20, 15, .65);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
body.sect .sect-node.is-right .sect-node-plaque {
  left: calc(100% + 5px);
}
body.sect .sect-node.is-left .sect-node-plaque {
  right: calc(100% + 5px);
}
body.sect .sect-node-seal {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  background: var(--cinnabar);
  color: #f7ecd6;
  font-family: var(--font-kai);
  font-size: 10px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(247, 236, 214, .18);
}
body.sect .sect-node-name {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-kai);
  font-size: clamp(9.5px, .98cqw, 13px);
  line-height: 1.06;
  letter-spacing: .12em;
  color: #f0e5cc;
  white-space: nowrap;
}
body.sect .sect-node:hover .sect-node-plaque,
body.sect .sect-node:focus-visible .sect-node-plaque {
  background: linear-gradient(180deg, #202722, #101512);
  border-color: var(--gold-soft);
  transform: translateY(-4px);
}
body.sect .sect-node:hover .sect-node-name,
body.sect .sect-node:focus-visible .sect-node-name,
body.sect .sect-node.is-active .sect-node-name {
  color: #f8e8bd;
}
body.sect .sect-node.is-active .sect-node-plaque {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 1px rgba(200, 165, 92, .30), 0 9px 20px -8px rgba(20, 20, 15, .7);
}

/* ---------- 图下信息条 ---------- */
body.sect .sect-map-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding: 13px 18px;
  background: linear-gradient(135deg, rgba(251, 248, 241, .97), rgba(239, 232, 217, .92));
  border: 1px solid var(--line-gold);
  box-shadow: var(--shadow);
}
body.sect .sect-map-info-seal {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--cinnabar);
  color: #f8eedb;
  font-family: var(--font-kai);
  font-size: 24px;
  line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(248, 238, 219, .16);
}
body.sect .sect-map-info-body {
  flex: 1;
  min-width: 0;
}
body.sect .sect-map-info-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .08em;
  color: var(--ink);
}
body.sect .sect-map-info-name small {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
  vertical-align: middle;
}
body.sect .sect-map-info-desc {
  margin-top: 2px;
  font-family: var(--font-kai);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
body.sect .sect-map-info-meta {
  margin-top: 3px;
  font-family: var(--font-body);
  font-size: 10.5px;
  color: var(--gold-deep);
  letter-spacing: .03em;
}
body.sect .sect-map-info-side {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
body.sect .sect-map-info-side .sect-btn {
  padding: 8px 15px;
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- 移动端：图作头图，七域改列表 ---------- */
body.sect .sect-mobile-areas {
  display: none;
}

@media (max-width: 900px) {
  body.sect .sect-map {
    margin-bottom: 18px;
  }
  body.sect .sect-map-frame {
    aspect-ratio: auto;
    height: clamp(214px, 54vw, 300px);
  }
  body.sect .sect-map-bg {
    object-position: center 48%;
    opacity: .9;
  }
  body.sect .sect-map-title {
    left: 16px;
    top: 14px;
    max-width: 66%;
  }
  body.sect .sect-map-taiji {
    left: auto;
    right: 6%;
    top: 16%;
    width: 66px;
    opacity: .17;
  }
  body.sect .sect-map-heading {
    font-size: 28px;
    letter-spacing: .08em;
  }
  body.sect .sect-map-poem {
    display: none;
  }
  body.sect .sect-map-stats,
  body.sect .sect-map-hud,
  body.sect .sect-map-nodes,
  body.sect .sect-map-sun,
  body.sect .sect-map-whisk,
  body.sect .sect-map-gourd,
  body.sect .sect-map-ox,
  body.sect .sect-map-info {
    display: none !important;
  }
  body.sect .sect-map-credit {
    left: 16px;
    bottom: 10px;
    font-size: 9px;
  }
  body.sect .sect-mobile-areas {
    display: grid;
    gap: 8px;
    margin-top: 12px;
  }
  body.sect .sect-mobile-area {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 13px;
    text-align: left;
    color: inherit;
    background: linear-gradient(135deg, rgba(251, 248, 241, .995), rgba(243, 237, 225, .985));
    border: 1px solid var(--line);
    box-shadow: 0 12px 26px -24px rgba(46, 38, 22, .6);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  body.sect .sect-mobile-area:active {
    transform: scale(.994);
  }
  body.sect .sect-mobile-seal {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--cinnabar);
    color: #f8eedb;
    font-family: var(--font-kai);
    font-size: 23px;
    line-height: 1;
    box-shadow: inset 0 0 0 2px rgba(248, 238, 219, .16);
  }
  body.sect .sect-mobile-seal.gold { background: var(--gold-deep); }
  body.sect .sect-mobile-seal.jade { background: #3f6b58; }
  body.sect .sect-mobile-seal.fire { background: #8c3b2a; }
  body.sect .sect-mobile-seal.ink { background: #3d4641; }
  body.sect .sect-mobile-body {
    min-width: 0;
  }
  body.sect .sect-mobile-name {
    display: block;
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: .06em;
    color: var(--ink);
  }
  body.sect .sect-mobile-desc {
    display: block;
    margin-top: 2px;
    font-family: var(--font-kai);
    font-size: 11px;
    line-height: 1.45;
    color: var(--ink-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.sect .sect-mobile-meta {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    color: var(--gold-deep);
  }
  body.sect .sect-mobile-arrow {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--gold);
    text-align: right;
  }
}

@media (max-width: 520px) {
  body.sect .sect-map-frame {
    height: 204px;
  }
  body.sect .sect-map-heading {
    font-size: 25px;
  }
  body.sect .sect-map-kicker {
    font-size: 8px;
  }
  body.sect .sect-mobile-area {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 10px 11px;
  }
  body.sect .sect-mobile-seal {
    width: 38px;
    height: 38px;
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sect .sect-map-taiji,
  body.sect .sect-map-hud-break .sect-can-break {
    animation: none;
  }
  body.sect .sect-node-art {
    transition: none;
  }
}
/* 山门图页隐藏全局太极水印，避免压在 HUD 与卡片上；图内已有金色太极 */
body.sect[data-module="sect"] .ink-taiji { display: none !important; }
/* 山门图页隐藏顶栏全局诗条，避免与图内题诗重复 */
body.sect[data-module="sect"] .topbar-poetry { display: none !important; }
/* 移动端七域列表标题 */
.sect-mobile-head { display: none; }
@media (max-width: 900px) {
  .sect-mobile-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 2px 2px 8px;
    padding: 0 2px;
  }
  .sect-mobile-head-title {
    font-family: var(--font-kai);
    font-size: 15px;
    letter-spacing: .22em;
    color: var(--ink-2);
  }
  .sect-mobile-head-hint {
    font-family: var(--font-kai);
    font-size: 11.5px;
    letter-spacing: .12em;
    color: var(--ink-3);
  }
}

/* 移动端：隐藏底部轮播诗条，避免遮挡七域列表 */
@media (max-width: 720px) {
  body.sect[data-module="sect"] .ink-poetry-bar { display: none !important; }
}
