/* 五角色场景 — 自交接包原样迁入，作用域限定在 .home-role-scene 内 */

.section.band.home-role-section {
  padding-bottom: 0;
  overflow: visible;
}

.section.band.home-role-section > .container {
  margin-bottom: 0;
}

.home-role-scene {
  --rs-ink: #333333;
  --rs-muted: rgba(51, 51, 51, .72);
  --rs-deep: #e8f0ff;
  --rs-panel: rgba(255, 255, 255, .78);
  --rs-panel-solid: rgba(255, 255, 255, .94);
  --rs-line: rgba(91, 143, 249, .16);
  --rs-accent: #5b8ff9;
  --rs-accent-2: #8a70d6;
  --rs-green: #168b5e;
  --rs-radius: 16px;
  --scene-offset-y: 0px;
  position: relative;
  width: 100%;
  color: var(--rs-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  box-sizing: border-box;
}

.home-role-scene *,
.home-role-scene *::before,
.home-role-scene *::after {
  box-sizing: border-box;
}

.home-role-scene .scene {
  position: relative;
  min-height: var(--scene-min-height-px, max(calc(56.28vw + 300px), 720px));
  isolation: isolate;
  background: transparent;
  --hero-crop-top: clamp(72px, 6.8vw, 112px);
  --hero-visible-bottom: var(--hero-visible-bottom-px, calc(56.28vw - var(--hero-crop-top)));
  --steps-panel-top: 0px;
}

.home-role-scene .scene::before {
  content: "";
  position: absolute;
  inset: 0 0 236px;
  z-index: -2;
  background: url("assets/role-scenes/hero-scene-station.png") center calc(-1 * var(--hero-crop-top)) / 100% auto no-repeat;
}

.home-role-scene .scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(232, 240, 255, .1), rgba(232, 240, 255, .02) 30%, rgba(232, 240, 255, .08) 66%, rgba(232, 240, 255, .42)),
    linear-gradient(90deg, rgba(232, 240, 255, .34), rgba(232, 240, 255, 0) 34%, rgba(232, 240, 255, .08));
}

.home-role-scene .constellation {
  position: absolute;
  inset: 4% 3% 26%;
  z-index: 1;
  pointer-events: none;
  opacity: .78;
  mix-blend-mode: screen;
}

.home-role-scene .constellation path {
  fill: none;
  stroke: rgba(155, 196, 255, .48);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 2 12;
  filter: drop-shadow(0 0 7px rgba(91, 143, 249, .42));
}

.home-role-scene .constellation .line-main {
  stroke: rgba(138, 176, 255, .58);
  stroke-width: 1.8;
  stroke-dasharray: none;
}

.home-role-scene .constellation .line-soft {
  stroke: rgba(220, 235, 255, .32);
  stroke-width: 1.1;
  stroke-dasharray: none;
}

.home-role-scene .constellation circle {
  fill: rgba(255, 248, 236, .96);
  stroke: rgba(225, 151, 88, .58);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 9px rgba(91, 143, 249, .46));
}

.home-role-scene .constellation .node-large {
  fill: rgba(255, 255, 255, .98);
  stroke-width: 2;
}

.home-role-scene .constellation .twinkle {
  fill: rgba(255, 206, 142, .86);
  stroke: none;
  filter: drop-shadow(0 0 8px rgba(91, 143, 249, .58));
}

.home-role-scene .constellation .user-path {
  stroke: rgba(138, 176, 255, .58);
  stroke-width: 1.9;
  stroke-dasharray: none;
}

.home-role-scene .constellation .user-node {
  fill: rgba(255, 248, 236, .98);
  stroke: rgba(225, 151, 88, .62);
  stroke-width: 1.8;
}

.home-role-scene .intro {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 4vw, 64px);
  top: clamp(18px, 3vh, 34px);
  max-width: min(1100px, calc(100% - 128px));
  display: none;
}

.home-role-scene .intro .eyebrow {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 7px 10px;
  border: 1px solid rgba(56, 208, 143, .34);
  border-radius: 999px;
  color: var(--rs-green);
  background: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(83, 53, 35, .08);
}

.home-role-scene .intro h1 {
  margin: 0;
  font-size: clamp(30px, 3.25vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
  text-shadow: 0 12px 30px rgba(255, 255, 255, .58);
}

.home-role-scene .intro .lead {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--rs-muted);
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.62;
}

.home-role-scene .role-node {
  position: absolute;
  z-index: 8;
  width: min(230px, 17vw);
  min-width: 168px;
  outline: none;
  cursor: pointer;
}

.home-role-scene .role-node::before {
  content: "";
  position: absolute;
  left: 22px;
  top: -18px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, .74);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rs-accent), var(--rs-accent-2));
  box-shadow: 0 0 0 6px rgba(91, 143, 249, .14), 0 0 22px rgba(91, 143, 249, .36);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.home-role-scene .role-label {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid rgba(73, 55, 44, .16);
  border-radius: var(--rs-radius);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 28px rgba(84, 57, 37, .12);
  backdrop-filter: blur(10px);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.home-role-scene .role-node:hover .role-label,
.home-role-scene .role-node:focus-within .role-label,
.home-role-scene .role-node.is-active .role-label {
  transform: translateY(-5px);
  border-color: rgba(91, 143, 249, .88);
  background: linear-gradient(180deg, rgba(247, 251, 255, .98), rgba(232, 240, 255, .94));
  box-shadow: 0 18px 42px rgba(91, 143, 249, .24), inset 0 0 0 1px rgba(255, 255, 255, .68), inset 0 3px 0 rgba(155, 196, 255, .72);
}

.home-role-scene .role-node:hover::before,
.home-role-scene .role-node:focus-within::before,
.home-role-scene .role-node.is-active::before {
  transform: translate(-1.5px, -1.5px) scale(1.18);
  background: linear-gradient(135deg, #6b9cff, #8a70d6);
  box-shadow: 0 0 0 8px rgba(91, 143, 249, .22), 0 0 28px rgba(107, 124, 255, .54);
}

.home-role-scene .role-label b {
  color: var(--rs-ink);
  font-size: 19px;
  line-height: 1.1;
  transition: color .2s ease;
}

.home-role-scene .role-node:hover .role-label b,
.home-role-scene .role-node:focus-within .role-label b,
.home-role-scene .role-node.is-active .role-label b {
  color: var(--rs-accent);
}

.home-role-scene .role-label span {
  color: rgba(55, 47, 41, .72);
  font-size: 11px;
  line-height: 1.45;
  transition: color .2s ease;
}

.home-role-scene .role-node:hover .role-label span,
.home-role-scene .role-node:focus-within .role-label span,
.home-role-scene .role-node.is-active .role-label span {
  color: rgba(91, 61, 40, .78);
}

.home-role-scene .brand { left: 9%; top: 38%; }
.home-role-scene .estate { left: 25%; top: 28%; }
.home-role-scene .consumer { left: 43%; top: 39%; }
.home-role-scene .ecommerce { right: 14%; top: 30%; }
.home-role-scene .designer { right: 8%; top: 50%; }

.home-role-scene .steps-panel {
  position: fixed;
  left: clamp(24px, 4vw, 64px);
  right: clamp(24px, 4vw, 64px);
  top: var(--steps-panel-top);
  bottom: auto;
  z-index: 4;
  width: auto;
  height: auto;
  max-height: none;
  overflow: visible;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(73, 55, 44, .14);
  border-radius: var(--rs-radius);
  background: linear-gradient(180deg, rgba(247, 251, 255, .92), rgba(232, 240, 255, .9));
  box-shadow: 0 24px 70px rgba(91, 143, 249, .18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity .22s ease, transform .22s ease;
  backdrop-filter: blur(14px);
}

.home-role-scene .role-node:hover .steps-panel,
.home-role-scene .role-node:focus-within .steps-panel,
.home-role-scene .role-node.is-active .steps-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.home-role-scene .panel-head {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  padding: 8px 14px 8px 0;
  border-right: 1px solid var(--rs-line);
  border-bottom: 0;
  text-align: center;
}

.home-role-scene .panel-head strong {
  display: block;
  color: var(--rs-accent);
  font-size: 27px;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
  text-shadow: 0 10px 26px rgba(91, 143, 249, .18);
}

.home-role-scene .role-node.brand .panel-head strong {
  color: var(--rs-accent);
  text-shadow: 0 10px 26px rgba(91, 143, 249, .18);
}

.home-role-scene .panel-head p {
  margin: 8px 0 0;
  max-width: 176px;
  color: var(--rs-muted);
  font-size: 13px;
  line-height: 1.55;
}

.home-role-scene .steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.home-role-scene .step {
  --scene-pos: center;
  counter-increment: step;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 0;
  align-items: start;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(73, 55, 44, .12);
  border-radius: var(--rs-radius);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 28px rgba(84, 57, 37, .08);
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateX(-18px) translateY(8px) scale(.985);
  filter: saturate(.94) blur(1.2px);
  will-change: opacity, transform, filter;
}

.home-role-scene .role-node:hover .step,
.home-role-scene .role-node:focus-within .step,
.home-role-scene .role-node.is-active .step {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
  filter: saturate(1) blur(0);
}

.home-role-scene .role-node:hover .step,
.home-role-scene .role-node:focus-within .step,
.home-role-scene .role-node.is-revealing .step {
  animation: roleSceneStepCascadeIn .56s cubic-bezier(.2, .82, .2, 1) both;
}

.home-role-scene .role-node.is-revealing .step:nth-child(1) { animation-delay: .04s; }
.home-role-scene .role-node.is-revealing .step:nth-child(2) { animation-delay: .14s; }
.home-role-scene .role-node.is-revealing .step:nth-child(3) { animation-delay: .24s; }
.home-role-scene .role-node.is-revealing .step:nth-child(4) { animation-delay: .34s; }
.home-role-scene .role-node.is-revealing .step:nth-child(5) { animation-delay: .44s; }

@keyframes roleSceneStepCascadeIn {
  0% {
    opacity: 0;
    transform: translateX(-28px) translateY(10px) scale(.975);
    filter: saturate(.88) blur(2px);
  }

  72% {
    filter: saturate(1.04) blur(0);
  }

  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
    filter: saturate(1) blur(0);
  }
}

.home-role-scene .step::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(232, 240, 255, .2)),
    var(--step-img, url("assets/role-scenes/hero-scene-station.png"));
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat;
  filter: saturate(1.05) contrast(.98);
}

.home-role-scene .step::after {
  content: none;
}

.home-role-scene .step .icon {
  display: none !important;
}

.home-role-scene .step > div {
  position: relative;
  padding: 12px 12px 14px 48px;
}

.home-role-scene .step > div::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 11px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #6b9cff, #8a70d6);
  box-shadow: 0 10px 20px rgba(91, 143, 249, .22);
  font-size: 12px;
  font-weight: 900;
}

.home-role-scene .step b {
  display: block;
  margin-bottom: 3px;
  color: var(--rs-ink);
  font-size: 14px;
  line-height: 1.25;
}

.home-role-scene .step > div > span {
  display: block;
  color: rgba(55, 47, 41, .66);
  font-size: 12px;
  line-height: 1.45;
}

.home-role-scene .brand .step:nth-child(1) { --scene-pos: 8% 70%; }
.home-role-scene .brand .step:nth-child(2) { --scene-pos: 17% 70%; }
.home-role-scene .brand .step:nth-child(3) { --scene-pos: 34% 56%; }

.home-role-scene .estate .step:nth-child(1) { --scene-pos: 28% 50%; }
.home-role-scene .estate .step:nth-child(2) { --scene-pos: 32% 52%; }
.home-role-scene .estate .step:nth-child(3) { --scene-pos: 30% 48%; }

.home-role-scene .consumer .step:nth-child(1) { --scene-pos: 44% 64%; }
.home-role-scene .consumer .step:nth-child(2) { --scene-pos: 52% 62%; }
.home-role-scene .consumer .step:nth-child(3) { --scene-pos: 22% 58%; }

.home-role-scene .ecommerce .step:nth-child(1) { --scene-pos: 70% 48%; }
.home-role-scene .ecommerce .step:nth-child(2) { --scene-pos: 82% 46%; }
.home-role-scene .ecommerce .step:nth-child(3) { --scene-pos: 76% 52%; }

.home-role-scene .designer .step:nth-child(1) { --scene-pos: 88% 66%; }
.home-role-scene .designer .step:nth-child(2) { --scene-pos: 76% 68%; }
.home-role-scene .designer .step:nth-child(3) { --scene-pos: 88% 72%; }

.home-role-scene .hint {
  position: absolute;
  left: clamp(24px, 4vw, 64px);
  bottom: 264px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(73, 55, 44, .14);
  border-radius: 999px;
  color: rgba(55, 47, 41, .72);
  background: rgba(255, 255, 255, .72);
  font-size: 13px;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(84, 57, 37, .1);
}

.home-role-scene .hint i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--rs-accent);
  box-shadow: 0 0 20px rgba(91, 143, 249, .52);
}

@media (prefers-reduced-motion: reduce) {
  .home-role-scene .steps-panel,
  .home-role-scene .role-node.is-revealing .step {
    animation: none !important;
    transition: none !important;
  }

  .home-role-scene .step {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* 中等宽度：收紧角色卡坐标，避免横向挤撞 */
@media (max-width: 1400px) and (min-width: 1201px) {
  .home-role-scene .role-node {
    width: min(200px, 15vw);
    min-width: 150px;
  }

  .home-role-scene .brand { left: 7%; top: 36%; }
  .home-role-scene .estate { left: 21%; top: 26%; }
  .home-role-scene .consumer { left: 39%; top: 37%; }
  .home-role-scene .ecommerce { right: 11%; top: 28%; }
  .home-role-scene .designer { right: 5%; top: 47%; }

  .home-role-scene .steps-panel {
    grid-template-columns: min(180px, 16vw) 1fr;
  }

  .home-role-scene .steps {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

/* 矮窗口：角色标签上移，给步骤栏留空 */
@media (max-height: 820px) and (min-width: 1201px) {
  .home-role-scene .scene {
    min-height: var(--scene-min-height-px, max(calc(56.28vw + 240px), 640px));
  }

  .home-role-scene .brand { top: 30%; }
  .home-role-scene .estate { top: 22%; }
  .home-role-scene .consumer { top: 32%; }
  .home-role-scene .ecommerce { top: 24%; }
  .home-role-scene .designer { top: 42%; }

  .home-role-scene .role-label b {
    font-size: 17px;
  }

  .home-role-scene .role-label span {
    font-size: 10px;
  }
}

@media (max-width: 1200px) {
  .home-role-scene .scene {
    min-height: auto;
    padding: 28px 16px;
  }

  .home-role-scene .scene::before {
    position: absolute;
  }

  .home-role-scene .intro,
  .home-role-scene .hint {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
  }

  .home-role-scene .intro {
    margin-bottom: 22px;
  }

  .home-role-scene .role-node {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    min-width: 0;
    margin: 10px 0;
  }

  .home-role-scene .role-node::before {
    display: none;
  }

  .home-role-scene .steps-panel {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    margin-top: 8px;
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .home-role-scene .role-node:not(.is-active) .steps-panel {
    display: none;
  }

  .home-role-scene .role-node:hover .steps-panel,
  .home-role-scene .role-node:focus-within .steps-panel {
    display: block;
  }

  .home-role-scene .hint {
    margin-top: 18px;
  }

  .home-role-scene .steps {
    grid-template-columns: 1fr;
  }

  .home-role-scene .panel-head {
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 16px;
    padding: 0 0 15px;
    border-right: 0;
    border-bottom: 1px solid var(--rs-line);
    text-align: left;
  }

  .home-role-scene .step {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: 0;
  }

  .home-role-scene .step::before {
    min-height: 0;
  }
}
