:root {
  --ink: #30294d;
  --muted: #716b87;
  --soft: #f7f5ff;
  --white: #ffffff;
  --line: rgba(103, 91, 157, 0.14);
  --purple: #8d7cf6;
  --purple-deep: #6b5de3;
  --lilac: #eadfff;
  --blue: #80b9ff;
  --blue-soft: #dff0ff;
  --pink: #ff9bc5;
  --pink-soft: #ffe7f2;
  --gray: #f1f2f7;
  --shadow: 0 16px 34px rgba(99, 84, 170, 0.16);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(229, 222, 255, 0.9), transparent 24%),
    linear-gradient(135deg, #f5f6ff 0%, #ecf6ff 100%);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

body {
  display: grid;
  place-items: center;
}

button {
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  user-select: none;
}

.h5-shell {
  position: relative;
  width: min(100vw, 390px);
  height: min(100svh, 844px);
  min-height: 640px;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: var(--soft);
  box-shadow: 0 20px 60px rgba(64, 58, 98, 0.2);
}

.h5-shell::-webkit-scrollbar {
  display: none;
}

.music-btn {
  position: fixed;
  z-index: 40;
  top: calc(14px + env(safe-area-inset-top));
  right: max(14px, calc((100vw - 390px) / 2 + 14px));
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(98, 82, 164, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.music-btn img {
  position: relative;
  z-index: 2;
  width: 19px;
  height: 19px;
}

.music-ring {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(141, 124, 246, 0.28);
  border-radius: 50%;
}

.music-btn.is-playing {
  background: #f0ecff;
  box-shadow: 0 10px 24px rgba(111, 91, 226, 0.22);
}

.music-btn.is-playing .music-ring {
  animation: spin 3.6s linear infinite;
}

.music-btn.is-tapped,
button.is-tapped,
.donut-slice.is-tapped {
  transform: scale(0.94);
}

.page {
  position: relative;
  height: 100%;
  min-height: 100%;
  padding: calc(28px + env(safe-area-inset-top)) 22px calc(66px + env(safe-area-inset-bottom));
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.page-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 16% 15%, rgba(255, 231, 242, 0.86), transparent 28%),
    radial-gradient(circle at 89% 12%, rgba(211, 232, 255, 0.92), transparent 26%),
    linear-gradient(180deg, #fbf9ff 0%, #eef4ff 56%, #f8f7ff 100%);
}

.page-flow {
  background:
    radial-gradient(circle at 12% 14%, rgba(225, 240, 255, 0.9), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #f3efff 100%);
}

.page-donut {
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 231, 242, 0.82), transparent 26%),
    linear-gradient(180deg, #faf9ff 0%, #eef7ff 100%);
}

.page-quadrant {
  background:
    radial-gradient(circle at 10% 12%, rgba(232, 224, 255, 0.88), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f8f4ff 100%);
}

.page-tags {
  background:
    radial-gradient(circle at 92% 14%, rgba(218, 238, 255, 0.88), transparent 26%),
    linear-gradient(180deg, #fbfaff 0%, #f4f6ff 100%);
}

.page-reasons {
  background:
    radial-gradient(circle at 13% 17%, rgba(235, 226, 255, 0.9), transparent 26%),
    radial-gradient(circle at 88% 14%, rgba(218, 238, 255, 0.78), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f2f5ff 100%);
}

.page-compare {
  background:
    radial-gradient(circle at 14% 18%, rgba(225, 241, 255, 0.86), transparent 24%),
    radial-gradient(circle at 88% 72%, rgba(244, 225, 255, 0.72), transparent 28%),
    linear-gradient(180deg, #fbfbff 0%, #f3efff 100%);
}

.page-anxiety {
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 230, 242, 0.82), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
}

.page-algorithm {
  background:
    radial-gradient(circle at 15% 15%, rgba(234, 226, 255, 0.92), transparent 26%),
    radial-gradient(circle at 82% 78%, rgba(219, 239, 255, 0.84), transparent 28%),
    linear-gradient(180deg, #fbfaff 0%, #f4f8ff 100%);
}

.page-chat {
  background:
    radial-gradient(circle at 88% 13%, rgba(220, 238, 255, 0.86), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f5f1ff 100%);
}

.page-chat .page-header.compact {
  margin-top: 14px;
}

.page-puzzle {
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 231, 242, 0.78), transparent 24%),
    linear-gradient(180deg, #fbfaff 0%, #eef6ff 100%);
}

.page-radar {
  background:
    radial-gradient(circle at 86% 13%, rgba(234, 226, 255, 0.9), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
}

.page-final {
  background:
    radial-gradient(circle at 16% 15%, rgba(255, 231, 242, 0.82), transparent 26%),
    radial-gradient(circle at 88% 18%, rgba(219, 239, 255, 0.88), transparent 25%),
    linear-gradient(180deg, #fbfaff 0%, #eef5ff 100%);
}

.soft-grid {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(114, 100, 190, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 100, 190, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}

.page-num {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 10px;
  border: 1px solid rgba(132, 115, 222, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #7667cc;
  font-size: 12px;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--purple-deep);
  font-size: 13px;
  font-weight: 800;
}

.cover-title-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 22px;
}

.cover-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.26;
  letter-spacing: 0;
}

.cover-subtitle {
  width: 308px;
  max-width: 100%;
  margin: 11px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.ambient-tag {
  position: absolute;
  z-index: 1;
  padding: 5px 9px;
  border: 1px solid rgba(132, 115, 222, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  color: #6c5eb9;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.28;
  animation: ambientFloat 6s ease-in-out infinite;
}

.ambient-a { top: 274px; left: 16px; animation-delay: -1.3s; }
.ambient-b { top: 356px; right: 12px; animation-delay: -3.1s; }
.ambient-c { top: 542px; left: 20px; animation-delay: -2.2s; }
.ambient-d { top: 618px; right: 15px; animation-delay: -4.2s; }

.page-cover .identity-card {
  position: relative;
  z-index: 2;
  width: 296px;
  max-width: 100%;
  margin-top: 20px;
}

.identity-card-motion {
  position: relative;
  filter: drop-shadow(0 12px 20px rgba(99, 84, 170, 0.1));
  animation: cardFloat 5.5s ease-in-out infinite;
}

.identity-bg {
  display: block;
  width: 100%;
  height: auto;
}

.identity-content {
  position: absolute;
  inset: 21px 27px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.identity-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.identity-head img {
  width: 44px;
  height: 44px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 14px rgba(99, 84, 170, 0.13);
}

.identity-head strong {
  display: block;
  color: #3c3460;
  font-size: 20px;
  line-height: 1.15;
}

.identity-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.identity-bars {
  display: grid;
  gap: 5px;
  margin: 8px 0;
}

.identity-bars i {
  display: block;
  width: 84%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(142, 126, 237, 0.42), rgba(134, 190, 255, 0.22));
}

.identity-bars i:nth-child(2) { width: 58%; }

.mini-stats {
  display: flex;
  gap: 6px;
}

.mini-stats span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 26px;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #696181;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.page-cover .tag-cloud {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  justify-content: center;
  gap: 8px;
  width: 294px;
  max-width: 100%;
  margin-top: 15px;
}

.page-cover .tag-cloud span {
  display: grid;
  place-items: center;
  width: 78px;
  min-height: 30px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #6e62b7;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(99, 84, 170, 0.08);
  animation: tagDrift 4.6s ease-in-out infinite;
}

.page-cover .tag-cloud span:nth-child(2) { animation-delay: -1.5s; }
.page-cover .tag-cloud span:nth-child(3) { animation-delay: -2.8s; }
.page-cover .tag-cloud span:nth-child(4) { animation-delay: -0.8s; }
.page-cover .tag-cloud span:nth-child(5) { animation-delay: -2.1s; }
.page-cover .tag-cloud span:nth-child(6) { animation-delay: -3.6s; }

.primary-btn,
.secondary-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(135deg, #8d7cf6, #6faeff);
  box-shadow: 0 14px 28px rgba(120, 101, 229, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn {
  width: 270px;
  margin-top: 18px;
  animation: breathe 2.5s ease-in-out infinite;
}

.page-cover .primary-btn {
  width: 280px;
  min-height: 54px;
  margin-top: 18px;
}

.page-cover.is-active .primary-btn.reveal,
.page-cover.page-current .primary-btn.reveal {
  animation:
    revealUp 0.58s 0.56s ease forwards,
    buttonGlow 2.5s 1.15s ease-in-out infinite;
}

.page-cover .primary-btn.is-tapped {
  animation-play-state: paused;
  transform: scale(0.94);
}

.page-cover.page-current .page-num,
.page-cover.is-active .page-num { animation-delay: 0.04s; }

.page-cover.page-current .eyebrow,
.page-cover.is-active .eyebrow { animation-delay: 0.12s; }

.page-cover.page-current .cover-title,
.page-cover.is-active .cover-title { animation-delay: 0.2s; }

.page-cover.page-current .cover-subtitle,
.page-cover.is-active .cover-subtitle { animation-delay: 0.29s; }

.page-cover.page-current .identity-card,
.page-cover.is-active .identity-card { animation-delay: 0.38s; }

.page-cover.page-current .tag-cloud,
.page-cover.is-active .tag-cloud { animation-delay: 0.47s; }

.secondary-btn {
  width: 112px;
  min-height: 36px;
  margin-top: 9px;
  font-size: 13px;
}

.page-header {
  position: relative;
  z-index: 2;
  margin-top: 28px;
}

.page-header.compact {
  margin-top: 20px;
}

.page-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: 0;
}

.page-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.64;
}

.flow-chart {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  margin-top: 18px;
}

.flow-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 66px;
  padding: 10px 10px;
  border: 1px solid rgba(129, 114, 220, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(99, 84, 170, 0.1);
  opacity: 0.68;
  transform: translateY(8px);
  transition: transform 0.24s ease, opacity 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.flow-node::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  width: 13px;
  height: 2px;
  background: linear-gradient(90deg, #b89cff, #83b7ff);
  opacity: 0.56;
}

.flow-node:nth-child(2n)::after,
.flow-node:nth-child(6)::after {
  display: none;
}

.flow-node:nth-child(2)::before,
.flow-node:nth-child(4)::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 2px;
  height: 15px;
  background: linear-gradient(180deg, #b89cff, #83b7ff);
  opacity: 0.52;
}

.node-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: #f1ecff;
  color: #7667cc;
  font-weight: 900;
}

.node-icon img {
  width: 26px;
  height: 26px;
}

.flow-node strong {
  font-size: 14px;
  line-height: 1.2;
}

.page-flow.is-active .flow-node {
  animation: flowIn 0.45s ease forwards;
  animation-delay: var(--delay);
}

.flow-node.is-active,
.flow-node:hover {
  opacity: 1;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(111, 91, 226, 0.18);
}

.flow-node.is-active .node-icon {
  background: linear-gradient(135deg, #8d7cf6, #80b9ff);
  color: #fff;
}

.info-popover,
.case-card,
.profile-card {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(129, 114, 220, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.info-popover {
  min-height: 96px;
  margin-top: 16px;
  padding: 16px 17px;
}

.info-popover span,
.case-card span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eee9ff;
  color: #6f5fe0;
  font-size: 12px;
  font-weight: 800;
}

.info-popover p,
.case-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.58;
}

.info-popover.is-showing,
.case-card.is-showing {
  animation: popCard 0.32s ease;
}

.donut-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  margin-top: 14px;
}

.donut-chart {
  width: 238px;
  height: 238px;
  overflow: visible;
  filter: drop-shadow(0 12px 22px rgba(99, 84, 170, 0.14));
}

.donut-base,
.donut-slice {
  fill: none;
  stroke-width: 31;
  transform: rotate(-90deg);
  transform-origin: 120px 120px;
}

.donut-base {
  stroke: #e8e4f7;
}

.donut-slice {
  pathLength: 100;
  cursor: pointer;
  transition: stroke-width 0.22s ease, filter 0.22s ease, opacity 0.22s ease;
}

.slice-name {
  stroke: #9e8cff;
  stroke-dasharray: 15 85;
  stroke-dashoffset: 0;
}

.slice-content {
  stroke: #76b2ff;
  stroke-dasharray: 25 75;
  stroke-dashoffset: -15;
}

.slice-action {
  stroke: #ff9bc5;
  stroke-dasharray: 20 80;
  stroke-dashoffset: -40;
}

.slice-interest {
  stroke: #9edcff;
  stroke-dasharray: 15 85;
  stroke-dashoffset: -60;
}

.slice-social {
  stroke: #c39bff;
  stroke-dasharray: 15 85;
  stroke-dashoffset: -75;
}

.slice-platform {
  stroke: #ffc1de;
  stroke-dasharray: 10 90;
  stroke-dashoffset: -90;
}

.donut-hole {
  fill: rgba(255, 255, 255, 0.95);
}

.donut-center-title,
.donut-center-sub {
  text-anchor: middle;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  fill: #463e68;
}

.donut-center-title {
  font-size: 17px;
  font-weight: 900;
}

.donut-center-sub {
  font-size: 11px;
  fill: #7b7394;
}

.donut-slice.is-active {
  stroke-width: 39;
  filter: drop-shadow(0 0 6px rgba(111, 91, 226, 0.35));
}

.legend-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.legend-chip {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #564d7c;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(99, 84, 170, 0.08);
  transition: transform 0.18s ease, background 0.18s ease;
}

.legend-chip i {
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: #9e8cff;
}

.legend-chip:nth-child(2) i { background: #76b2ff; }
.legend-chip:nth-child(3) i { background: #ff9bc5; }
.legend-chip:nth-child(4) i { background: #9edcff; }
.legend-chip:nth-child(5) i { background: #c39bff; }
.legend-chip:nth-child(6) i { background: #ffc1de; }

.legend-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, #8d7cf6, #76b2ff);
}

.chart-popover {
  min-height: 86px;
  margin-top: 11px;
}

.quadrant-board {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding: 8px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 0 0 1px rgba(129, 114, 220, 0.1);
}

.quadrant-card {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 114px;
  border-radius: 22px;
  box-shadow: 0 12px 24px rgba(99, 84, 170, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.quadrant-card span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: #63569d;
  font-weight: 900;
}

.quadrant-card strong {
  font-size: 15px;
}

.quadrant-card.is-active {
  transform: scale(1.04);
  box-shadow: 0 16px 32px rgba(99, 84, 170, 0.18);
  filter: saturate(1.08);
}

.q-real { background: #eae3ff; }
.q-polish { background: #ddf0ff; }
.q-emotion { background: #ffe6f2; }
.q-circle { background: #e8ecff; }

.case-card {
  min-height: 105px;
  margin-top: 16px;
  padding: 16px 17px;
}

.persona-tags {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.persona-tags button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(129, 114, 220, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #584f83;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(99, 84, 170, 0.08);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.persona-tags button.is-selected {
  color: #fff;
  background: linear-gradient(135deg, #8d7cf6, #80b9ff);
  box-shadow: 0 12px 22px rgba(111, 91, 226, 0.22);
  animation: tagBounce 0.34s ease;
}

.tag-limit {
  position: relative;
  z-index: 2;
  margin: 12px 0 0;
  color: #756aa2;
  font-size: 12px;
  font-weight: 800;
}

.tag-limit.is-limit {
  color: #df6f9c;
  animation: shake 0.26s ease;
}

.profile-card {
  margin-top: 13px;
  padding: 15px 15px 13px;
}

.profile-card.is-generated {
  animation: popCard 0.36s ease;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-top img {
  width: 52px;
  height: 52px;
  border-radius: 18px;
}

.profile-top strong {
  display: block;
  font-size: 17px;
}

.profile-top span {
  display: block;
  max-width: 232px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card p {
  min-height: 42px;
  margin: 13px 0 10px;
  color: #514778;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.profile-actions {
  display: flex;
  gap: 9px;
}

.profile-actions span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f4f1ff;
  color: #7667cc;
  font-size: 12px;
  font-weight: 800;
}

.profile-actions img {
  width: 16px;
  height: 16px;
}

.reason-decor {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.reason-decor span {
  min-height: 25px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(105, 91, 164, 0.62);
  font-size: 11px;
  font-weight: 800;
}

.reason-bars {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 9px;
  margin-top: 13px;
  padding: 14px 12px;
  border: 1px solid rgba(129, 114, 220, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.reason-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: #514778;
  transition: transform 0.2s ease, background 0.2s ease;
}

.reason-row.is-active {
  border-radius: 16px;
  background: rgba(240, 236, 255, 0.7);
}

.reason-label {
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.reason-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeafa;
}

.reason-track i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b7a8ff, #74b8ff);
  box-shadow: 0 0 12px rgba(118, 178, 255, 0.35);
  transform: scaleX(0);
  transform-origin: left center;
}

.page-reasons.is-active .reason-track i {
  animation: barGrow 0.78s ease forwards;
  animation-delay: var(--delay);
}

.reason-row b {
  color: #7667cc;
  font-size: 12px;
  text-align: right;
}

.reason-popover {
  min-height: 88px;
  margin-top: 13px;
}

.self-compare {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 82px 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 10px;
  border: 1px solid rgba(129, 114, 220, 0.13);
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(231, 245, 255, 0.72) 0 var(--split), rgba(241, 235, 255, 0.72) var(--split) 100%),
    rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.compare-card {
  display: grid;
  gap: 6px;
  min-height: 186px;
  padding: 13px 9px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(129, 114, 220, 0.08);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.compare-offline { opacity: var(--offline-alpha); }
.compare-online { opacity: var(--online-alpha); }

.compare-card strong {
  color: #453d68;
  font-size: 15px;
}

.compare-card span {
  display: grid;
  place-items: center;
  min-height: 25px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f4f1ff;
  color: #7163c6;
  font-size: 11px;
  font-weight: 800;
}

.compare-online span {
  background: #eaf5ff;
  color: #4d83c6;
}

.compare-phone {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  height: 160px;
  border: 6px solid rgba(89, 79, 133, 0.15);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(239, 236, 255, 0.78));
}

.compare-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, #fff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 72%, #fff 0 24%, transparent 25%),
    linear-gradient(135deg, #9d8dff, #80b9ff);
  box-shadow: 0 10px 18px rgba(99, 84, 170, 0.14);
}

.compare-phone p {
  margin: 0;
  color: #665c93;
  font-size: 11px;
  font-weight: 900;
}

.compare-slider,
.emotion-range {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: #756aa2;
  font-size: 12px;
  font-weight: 900;
}

.compare-slider input,
.emotion-range input {
  flex: 1;
  width: 100%;
  accent-color: var(--purple);
}

.compare-result {
  position: relative;
  z-index: 2;
  min-height: 54px;
  margin: 12px 0 0;
  padding: 13px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: #514778;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  box-shadow: 0 10px 22px rgba(99, 84, 170, 0.09);
}

.emotion-curve {
  position: relative;
  z-index: 2;
  margin-top: 17px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(129, 114, 220, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.emotion-curve svg {
  display: block;
  width: 100%;
  height: 178px;
  overflow: visible;
}

.emotion-base,
.emotion-active {
  fill: none;
  stroke-linecap: round;
  stroke-width: 7;
}

.emotion-base {
  stroke: #e6e2f4;
}

.emotion-active {
  stroke: #8d7cf6;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  transition: stroke-dashoffset 0.28s ease;
}

.emotion-dot {
  fill: #d8d4e8;
  stroke: #fff;
  stroke-width: 4;
  transition: fill 0.2s ease, filter 0.2s ease, transform 0.2s ease;
  transform-origin: center;
}

.emotion-dot.is-active {
  fill: #7768ec;
  filter: drop-shadow(0 0 8px rgba(111, 91, 226, 0.55));
  transform: scale(1.15);
}

.emotion-labels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-top: -4px;
  color: #716b87;
  font-size: 9.5px;
  font-weight: 800;
  text-align: center;
}

.emotion-card {
  min-height: 90px;
  margin-top: 12px;
}

.algorithm-loop {
  position: relative;
  z-index: 2;
  width: 268px;
  height: 210px;
  margin: 14px auto 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 27%, transparent 28%),
    conic-gradient(from 25deg, rgba(141, 124, 246, 0.22), rgba(128, 185, 255, 0.2), rgba(255, 155, 197, 0.16), rgba(141, 124, 246, 0.22));
  box-shadow: var(--shadow);
}

.loop-core,
.loop-step {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
}

.loop-core {
  left: 50%;
  top: 50%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8d7cf6, #80b9ff);
  color: #fff;
  font-size: 15px;
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 26px rgba(111, 91, 226, 0.24);
}

.loop-step {
  width: 78px;
  min-height: 38px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #615692;
  font-size: 11px;
  opacity: 0.55;
  box-shadow: 0 10px 18px rgba(99, 84, 170, 0.09);
}

.step-1 { left: 95px; top: 4px; }
.step-2 { right: 0; top: 58px; }
.step-3 { right: 26px; bottom: 4px; }
.step-4 { left: 26px; bottom: 4px; }
.step-5 { left: 0; top: 58px; }

.page-algorithm.is-active .loop-step {
  animation: loopGlow 1.9s ease-in-out infinite;
}

.page-algorithm.is-active .step-2 { animation-delay: .22s; }
.page-algorithm.is-active .step-3 { animation-delay: .44s; }
.page-algorithm.is-active .step-4 { animation-delay: .66s; }
.page-algorithm.is-active .step-5 { animation-delay: .88s; }

.mini-action {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8d7cf6, #80b9ff);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(111, 91, 226, 0.21);
}

.mini-action img {
  width: 17px;
  height: 17px;
}

.page-algorithm .mini-action {
  margin-top: 11px;
}

.feed-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.feed-grid span {
  display: grid;
  place-items: center;
  min-height: 33px;
  padding: 0 5px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  color: #675d93;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(99, 84, 170, 0.08);
}

.feed-grid.is-shuffling span {
  animation: shuffleCard 0.34s ease;
}

.algo-note {
  position: relative;
  z-index: 2;
  margin: 10px 0 0;
  color: #6f5fe0;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.wechat-window {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 314px;
  max-width: 100%;
  height: 360px;
  margin: 8px auto 0;
  overflow: hidden;
  border: 1px solid rgba(129, 114, 220, 0.12);
  border-radius: 28px;
  background: #ededf2;
  box-shadow: 0 18px 34px rgba(99, 84, 170, 0.16);
}

.wechat-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 48px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(115, 108, 135, 0.1);
  background: rgba(247, 247, 249, 0.96);
}

.wechat-back {
  color: #5b536f;
  font-size: 28px;
  line-height: 1;
}

.wechat-topbar div {
  min-width: 0;
  flex: 1;
  text-align: center;
}

.wechat-topbar strong,
.wechat-topbar small {
  display: block;
}

.wechat-topbar strong {
  color: #27242f;
  font-size: 15px;
  line-height: 1.1;
}

.wechat-topbar small {
  margin-top: 3px;
  color: #8b8599;
  font-size: 10px;
  font-weight: 800;
}

.wechat-topbar img {
  width: 22px;
  height: 22px;
}

.wechat-body {
  flex: 1;
  min-height: 0;
  padding: 12px 10px 8px;
  overflow: hidden auto;
  scroll-behavior: smooth;
}

.wechat-body::-webkit-scrollbar {
  display: none;
}

.chat-time {
  display: table;
  margin: 0 auto 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(170, 170, 178, 0.28);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.chat-empty {
  width: 230px;
  margin: 46px auto 0;
  color: #8a8498;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
}

.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 9px;
  animation: chatPop 0.28s ease;
}

.chat-row.me {
  justify-content: flex-end;
}

.chat-row img {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(70, 65, 96, 0.1);
}

.chat-row.me img {
  order: 2;
}

.chat-bubble {
  position: relative;
  max-width: 218px;
  padding: 8px 10px;
  border-radius: 13px;
  background: #ffffff;
  color: #30294d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 5px 12px rgba(69, 63, 96, 0.06);
}

.chat-row.me .chat-bubble {
  background: #c8f0bc;
}

.chat-row.summary .chat-bubble {
  background: linear-gradient(135deg, #f0ecff, #e8f5ff);
  color: #4d4274;
  font-weight: 900;
  box-shadow:
    0 10px 20px rgba(111, 91, 226, 0.14),
    0 0 0 1px rgba(141, 124, 246, 0.18),
    0 0 18px rgba(141, 124, 246, 0.16);
}

.typing-row {
  display: none;
  align-items: center;
  gap: 7px;
  flex: 0 0 36px;
  padding: 0 10px 8px;
}

.typing-row.is-showing {
  display: flex;
}

.typing-row img {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 11px;
  border-radius: 14px;
  background: #fff;
}

.typing-bubble i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9a94a8;
  animation: typingBounce 1s ease-in-out infinite;
}

.typing-bubble i:nth-child(2) { animation-delay: .15s; }
.typing-bubble i:nth-child(3) { animation-delay: .3s; }

.typing-row em {
  color: #8a8498;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.wechat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 42px;
  padding: 7px 10px;
  border-top: 1px solid rgba(115, 108, 135, 0.1);
  background: rgba(248, 248, 250, 0.96);
}

.wechat-input span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #9995a4;
  border-radius: 50%;
  color: #706b7d;
  font-size: 18px;
  line-height: 1;
}

.wechat-input p {
  flex: 1;
  margin: 0;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  color: #aaa5b4;
  font-size: 12px;
  font-weight: 800;
}

.wechat-input img {
  width: 24px;
  height: 24px;
}

.chat-next {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 200px;
  min-height: 40px;
  margin: 12px auto 0;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8d7cf6, #80b9ff);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(111, 91, 226, 0.2);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.chat-next img {
  width: 17px;
  height: 17px;
}

.chat-next.is-complete {
  background: rgba(255, 255, 255, 0.78);
  color: #796fa0;
  box-shadow: 0 8px 18px rgba(99, 84, 170, 0.09);
}

.puzzle-zone {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 10px;
  align-items: stretch;
  margin-top: 14px;
}

.puzzle-pieces {
  display: grid;
  gap: 7px;
}

.puzzle-pieces button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid rgba(129, 114, 220, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: #5f548a;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(99, 84, 170, 0.08);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.puzzle-pieces img {
  width: 20px;
  height: 20px;
}

.puzzle-pieces button.is-flying {
  animation: puzzleFly 0.46s ease forwards;
}

.puzzle-pieces button.is-done {
  opacity: 0.45;
  background: #f1ecff;
}

.puzzle-card {
  min-height: 264px;
  padding: 13px 12px;
  border: 1px solid rgba(129, 114, 220, 0.13);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(235, 242, 255, 0.78));
  box-shadow: var(--shadow);
  text-align: left;
}

.puzzle-card strong {
  display: block;
  margin-bottom: 8px;
  color: #443b68;
  font-size: 16px;
}

.puzzle-card p,
.puzzle-avatar {
  margin: 0 0 6px;
  min-height: 25px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  color: #766f93;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.puzzle-avatar.is-filled,
.puzzle-card p.is-filled {
  color: #534879;
  background: rgba(241, 236, 255, 0.86);
  animation: popCard 0.32s ease;
}

.puzzle-tip {
  min-height: 74px;
  margin-top: 10px;
  padding: 12px 14px;
}

.puzzle-reset {
  display: flex;
  margin: 9px auto 0;
}

.radar-panel {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid rgba(129, 114, 220, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.radar-chart {
  width: 246px;
  height: 222px;
  overflow: visible;
  transform: scale(0.82);
  opacity: 0.52;
  transition: transform 0.42s ease, opacity 0.42s ease;
}

.radar-panel.is-expanded .radar-chart {
  transform: scale(1);
  opacity: 1;
}

.radar-grid {
  fill: rgba(236, 232, 255, 0.5);
  stroke: rgba(128, 110, 210, 0.25);
  stroke-width: 2;
}

.radar-grid.inner {
  fill: rgba(224, 240, 255, 0.44);
}

.radar-chart line {
  stroke: rgba(128, 110, 210, 0.18);
  stroke-width: 1.5;
}

.radar-shape {
  fill: rgba(141, 124, 246, 0.23);
  stroke: #7f70ef;
  stroke-width: 3;
  transform: scale(0);
  transform-origin: 130px 120px;
  transition: transform 0.45s ease;
}

.radar-panel.is-expanded .radar-shape {
  transform: scale(1);
}

.radar-chart text {
  fill: #62578f;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
}

.radar-toggle {
  display: flex;
  width: 132px;
  margin: 10px auto 0;
}

.radar-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.radar-list p {
  margin: 0;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  color: #716b87;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0.45;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.radar-list p.is-active {
  opacity: 1;
  transform: translateY(0);
  background: rgba(241, 236, 255, 0.88);
}

.final-orbit {
  position: relative;
  z-index: 2;
  height: 32px;
  margin-top: 10px;
}

.final-orbit span {
  position: absolute;
  min-height: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(105, 91, 164, 0.68);
  font-size: 11px;
  font-weight: 900;
  animation: tagDrift 4.6s ease-in-out infinite;
}

.final-orbit span:nth-child(1) { left: 18px; top: 4px; }
.final-orbit span:nth-child(2) { left: 104px; top: 0; animation-delay: -1.2s; }
.final-orbit span:nth-child(3) { right: 84px; top: 5px; animation-delay: -2.1s; }
.final-orbit span:nth-child(4) { right: 16px; top: 1px; animation-delay: -3s; }

.final-manual {
  position: relative;
  z-index: 2;
  min-height: 236px;
  margin-top: 8px;
  padding: 18px 17px;
  border: 1px solid rgba(129, 114, 220, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(237, 244, 255, 0.84));
  box-shadow: var(--shadow);
}

.final-manual.is-generated {
  animation: manualFlip 0.48s ease;
}

.final-manual h3 {
  margin: 0 0 12px;
  color: #443b68;
  font-size: 17px;
  line-height: 1.25;
  text-align: center;
}

.final-manual p {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 5px;
  margin: 8px 0 0;
  color: #70678e;
  font-size: 12.5px;
  line-height: 1.45;
}

.final-manual p span {
  color: #7a6bda;
  font-weight: 900;
}

.final-manual p strong {
  color: #4e456f;
  font-weight: 800;
}

.final-actions {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 13px;
}

.final-generate {
  width: 270px;
  min-height: 46px;
  margin: 0;
  animation: breathe 2.5s ease-in-out infinite;
}

.final-actions .secondary-btn {
  margin: 0;
}

.final-line {
  position: relative;
  z-index: 2;
  margin: 10px auto 0;
  max-width: 305px;
  color: #5e5486;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
}

.end-hint b {
  color: rgba(111, 91, 226, 0.62);
  font-size: 11px;
}

.end-hint {
  bottom: calc(22px + env(safe-area-inset-bottom));
  gap: 0;
}

.swipe-hint {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 180px;
  margin-left: -90px;
  color: rgba(92, 82, 137, 0.62);
  font-size: 12px;
  pointer-events: none;
}

.swipe-hint i {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: hintMove 1.5s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.page.is-active .reveal,
.page-current .reveal {
  animation: revealUp 0.58s ease forwards;
}

.page.is-active .reveal:nth-child(2) { animation-delay: .05s; }
.page.is-active .reveal:nth-child(3) { animation-delay: .1s; }
.page.is-active .reveal:nth-child(4) { animation-delay: .15s; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flowIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popCard {
  0% { transform: scale(0.96); opacity: 0.76; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes tagBounce {
  0% { transform: scale(0.9); }
  62% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.02); }
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes ambientFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes tagDrift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes buttonGlow {
  0%, 100% { box-shadow: 0 14px 28px rgba(120, 101, 229, 0.28); }
  50% { box-shadow: 0 18px 30px rgba(120, 101, 229, 0.4); }
}

@keyframes hintMove {
  0%, 100% { opacity: .45; transform: translateY(0) rotate(45deg); }
  50% { opacity: 1; transform: translateY(5px) rotate(45deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  33% { transform: translateX(-5px); }
  66% { transform: translateX(5px); }
}

@keyframes barGrow {
  to { transform: scaleX(1); }
}

@keyframes loopGlow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  45% { opacity: 1; transform: scale(1.05); box-shadow: 0 13px 22px rgba(111, 91, 226, 0.18); }
}

@keyframes shuffleCard {
  0% { transform: translateY(6px) scale(0.95); opacity: 0.45; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes chatPop {
  0% { transform: translateY(6px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes typingBounce {
  0%, 100% { transform: translateY(0); opacity: .45; }
  50% { transform: translateY(-3px); opacity: 1; }
}

@keyframes puzzleFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(86px, 18px) scale(0.62); opacity: 0.1; }
}

@keyframes manualFlip {
  0% { transform: rotateY(0deg); }
  45% { transform: rotateY(10deg) scale(0.98); }
  100% { transform: rotateY(0deg) scale(1); }
}

@media (max-height: 720px) {
  .page {
    padding-top: calc(18px + env(safe-area-inset-top));
    padding-bottom: calc(54px + env(safe-area-inset-bottom));
  }

  .cover-title-wrap,
  .page-header {
    margin-top: 16px;
  }

  .cover-title {
    font-size: 29px;
  }

  .page-cover .identity-card {
    width: 280px;
    margin-top: 14px;
  }

  .tag-cloud,
  .page-copy {
    margin-top: 8px;
  }

  .flow-node {
    min-height: 58px;
  }

  .donut-chart {
    width: 210px;
    height: 210px;
  }

  .quadrant-card {
    min-height: 96px;
  }

  .reason-bars {
    gap: 6px;
    margin-top: 10px;
    padding: 12px 11px;
  }

  .reason-row {
    min-height: 30px;
  }

  .self-compare {
    margin-top: 12px;
  }

  .compare-card {
    min-height: 158px;
  }

  .compare-phone {
    height: 138px;
  }

  .emotion-curve svg {
    height: 146px;
  }

  .algorithm-loop {
    width: 238px;
    height: 184px;
  }

  .wechat-window {
    height: 305px;
    margin-top: 7px;
  }

  .chat-next {
    min-height: 38px;
    margin-top: 10px;
  }

  .chat-bubble {
    max-width: 202px;
    font-size: 11.5px;
  }

  .puzzle-card {
    min-height: 238px;
  }

  .puzzle-pieces button {
    min-height: 34px;
  }

  .radar-chart {
    width: 218px;
    height: 190px;
  }

  .radar-list p {
    padding: 5px 9px;
  }

  .final-manual {
    min-height: 212px;
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
