/* awakening.css — 超体觉醒 v4.0 玻璃舞台字幕 · 粒子融合 · 转场 */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-y: overlay; /* transparent scrollbar on supported browsers */
  background: #0a0914;
  font-family: 'Noto Sans SC', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-overflow-scrolling: touch; /* smooth scroll iOS */
}

body {
  margin: 0;
}

/* ---------- Canvas Background ---------- */
#aw-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Main Container ---------- */
.aw-container {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  min-height: 100vh; width: 100%;
  padding: 24px 0 88px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(16px);
}

.aw-container.aw-container--mounted {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.aw-content {
  width: 100%; max-width: none;
  display: flex; flex-direction: column;
  align-items: stretch;
  padding: 0 clamp(10px, 3vw, 28px) 48px;
  box-sizing: border-box;
}

/* ---------- 字幕舞台：毛玻璃 + 流光边（与粒子同色系） ---------- */
.aw-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(92vw, 640px);
  margin: 0 auto 1.5rem;
}

.aw-stage-shine {
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  background: linear-gradient(
    125deg,
    rgba(167, 139, 250, 0.38),
    transparent 40%,
    rgba(251, 191, 36, 0.14)
  );
  opacity: 0.5;
  pointer-events: none;
  animation: awStageShine 10s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes awStageShine {
  0% { opacity: 0.38; transform: rotate(-1.5deg) scale(1); }
  100% { opacity: 0.62; transform: rotate(1.5deg) scale(1.015); }
}

.aw-stage-glass {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  padding: clamp(1.05rem, 3.2vw, 1.65rem) clamp(0.95rem, 3.8vw, 1.85rem);
  background: rgba(10, 8, 22, 0.52);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(167, 139, 250, 0.24);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 80px rgba(167, 139, 250, 0.06);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.55s ease;
}

.aw-stage--out .aw-stage-glass {
  opacity: 0;
  transform: scale(0.96) translateY(16px);
  filter: blur(14px);
}

.aw-stage--out .aw-stage-shine {
  opacity: 0;
  transition: opacity 0.45s ease;
}

/* 基因螺旋全屏演示前收起舞台，避免挡住 Canvas */
.aw-stage--spiral-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  max-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  overflow: hidden;
  transition: opacity 0.32s ease, max-height 0.42s ease, margin 0.42s ease,
    visibility 0s linear 0.42s;
}

.aw-stage--spiral-hidden .aw-stage-shine,
.aw-stage--spiral-hidden .aw-tap-hint {
  opacity: 0;
}

.aw-stage-inner {
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
  min-height: 3.2rem;
  max-height: min(50vh, 400px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 10px,
    #000 calc(100% - 14px),
    transparent 100%
  );
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.aw-stage-glass:hover .aw-stage-inner {
  scrollbar-color: rgba(139, 120, 220, 0.35) rgba(0, 0, 0, 0.06);
}

.aw-stage-inner::-webkit-scrollbar {
  width: 6px;
}

.aw-stage-inner::-webkit-scrollbar-track {
  background: transparent;
}

.aw-stage-inner::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

.aw-stage-glass:hover .aw-stage-inner::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.3);
}

.aw-line {
  font-size: clamp(1.08rem, 3.7vw, 1.38rem);
  line-height: 1.72;
  color: #eef0f8;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.aw-line--in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.aw-line--done {
  transition: transform 0.35s ease;
}

.aw-line.main {
  font-weight: 500;
}

.aw-line.narration {
  font-size: clamp(0.92rem, 3vw, 1.05rem);
  color: rgba(190, 176, 235, 0.82);
  font-style: italic;
  text-align: center;
}

.aw-line.quote {
  color: #d8ccff;
  font-style: italic;
  padding-left: 14px;
  border-left: 3px solid rgba(167, 139, 250, 0.5);
}

.aw-line.highlight {
  font-weight: 700;
  color: #ffe08a;
  text-shadow: 0 0 26px rgba(251, 191, 36, 0.38);
  font-size: clamp(1.15rem, 3.9vw, 1.48rem);
}

.aw-line--empty {
  min-height: 0.45em;
  opacity: 0.32 !important;
}

.aw-tap-hint {
  position: relative;
  z-index: 1;
  margin-top: 0.65rem;
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: rgba(167, 139, 250, 0.4);
}

/* ---------- 退场：与首页粒子 handoff 视觉连续 ---------- */
body.aw-exit-to-home #aw-canvas {
  opacity: 0.55;
  filter: blur(8px);
  transition: opacity 0.55s ease, filter 0.55s ease;
}

body.aw-exit-to-home .aw-stage-glass {
  opacity: 0.35;
  transform: scale(1.02);
  filter: blur(6px);
}

/* ---------- Cursor ---------- */
.aw-cursor {
  display: inline-block;
  color: #c4b5fd;
  animation: awCursorBlink 0.53s step-end infinite;
  font-weight: 300;
  margin-left: 1px;
}

.aw-line .aw-cursor {
  font-size: 0.95em;
  vertical-align: baseline;
}

@keyframes awCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .aw-container {
    opacity: 1;
    transform: none;
  }
  .aw-container.aw-container--mounted {
    transition: none;
  }
  .aw-stage-shine { animation: none; opacity: 0.45; }
  .aw-line {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .aw-cursor { animation: none; }
  .aw-archetype-scroll-hint { animation: none; opacity: 0.78; }
  .aw-stage--spiral-hidden { transition: none; }
}

/* ---------- Choice Cards ---------- */
.aw-choices {
  position: relative;
  z-index: 25;
  width: 100%; max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  display: flex; flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.aw-choice-back {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px dashed rgba(167, 139, 250, 0.35);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(203, 213, 225, 0.82);
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  -webkit-appearance: none;
}

.aw-choice-back:hover {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(167, 139, 250, 0.08);
  color: #e2e8f0;
}

.aw-choice {
  display: block; width: 100%;
  padding: 17px 22px;
  background: rgba(167,139,250,0.05);
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: 12px;
  color: #e9d5ff;
  font-size: clamp(1.12rem, 3.2vw, 1.32rem);
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: pre-wrap;
  opacity: 0;
  transform: translateY(12px);
  animation: awChoiceIn 0.4s ease forwards;
  font-family: inherit;
  -webkit-appearance: none;
}

.aw-choice:nth-child(2) { animation-delay: 0.08s; }
.aw-choice:nth-child(3) { animation-delay: 0.16s; }
.aw-choice:nth-child(4) { animation-delay: 0.24s; }
.aw-choice:nth-child(5) { animation-delay: 0.32s; }
.aw-choice:nth-child(6) { animation-delay: 0.40s; }
.aw-choice:nth-child(7) { animation-delay: 0.48s; }
.aw-choice:nth-child(8) { animation-delay: 0.56s; }
.aw-choice:nth-child(9) { animation-delay: 0.64s; }

.aw-choice:hover {
  background: rgba(167,139,250,0.14);
  border-color: rgba(167,139,250,0.4);
  box-shadow: 0 0 22px rgba(167,139,250,0.12);
  transform: translateY(-2px);
}

.aw-choice:active { transform: scale(0.98); }

.aw-choice.selected {
  background: rgba(167,139,250,0.22);
  border-color: #a78bfa;
  box-shadow: 0 0 30px rgba(167,139,250,0.25);
}

.aw-choice.not-selected {
  opacity: 0.2;
  pointer-events: none;
  transform: translateY(4px);
  transition: all 0.3s ease;
}

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

/* ---------- Archetype Report Card ---------- */
.aw-archetype-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: min(88vh, 720px);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--archetype-color, #a78bfa) 8%, transparent) 0%,
    rgba(167,139,250,0.06) 100%
  );
  border: 1px solid color-mix(in srgb, var(--archetype-color, #a78bfa) 30%, transparent);
  border-radius: 16px;
  padding: 0;
  margin: 24px auto;
  text-align: center;
  opacity: 0;
  animation: awCardIn 0.8s ease forwards;
  overflow: hidden;
  z-index: 20;
  position: relative;
}

.aw-archetype-card-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 28px 22px 16px;
  text-align: center;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.aw-archetype-card-body:hover {
  scrollbar-color: rgba(139, 120, 220, 0.28) rgba(255, 255, 255, 0.04);
}

.aw-archetype-card-body::-webkit-scrollbar {
  width: 7px;
}

.aw-archetype-card-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin: 6px 0;
}

.aw-archetype-card-body::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.08);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
  backdrop-filter: blur(6px);
}

.aw-archetype-card-body:hover::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.aw-archetype-card-footer {
  flex-shrink: 0;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(167, 139, 250, 0.18);
  background: linear-gradient(180deg,
    rgba(8, 6, 18, 0.35) 0%,
    rgba(12, 10, 22, 0.55) 100%
  );
}

.aw-archetype-scroll-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: rgba(186, 172, 232, 0.72);
  animation: awTapHintPulse 2.8s ease-in-out infinite;
}

.aw-archetype-continue-btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  font-size: clamp(1rem, 3.2vw, 1.1rem);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: opacity 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--archetype-color, #a78bfa) 75%, #6d28d9),
    var(--archetype-color, #a78bfa)
  );
  color: #fff;
  box-shadow: 0 4px 18px var(--archetype-glow, rgba(167, 139, 250, 0.28));
}

.aw-archetype-continue-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
  box-shadow: none;
  background: rgba(167, 139, 250, 0.12);
  color: rgba(232, 228, 239, 0.45);
}

.aw-archetype-continue-btn:not(:disabled):active {
  transform: scale(0.98);
}

.aw-archetype-details {
  margin: 12px 0 0;
  padding: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.12);
  text-align: left;
}

.aw-archetype-details + .aw-archetype-details {
  margin-top: 10px;
}

.aw-archetype-details summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 36px 12px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fbbf24;
  user-select: none;
  position: relative;
}

.aw-archetype-details summary::-webkit-details-marker {
  display: none;
}

.aw-archetype-details summary::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 0.35em;
  height: 0.35em;
  margin-top: -0.05em;
  border-right: 2px solid rgba(186, 172, 232, 0.7);
  border-bottom: 2px solid rgba(186, 172, 232, 0.7);
  transform: translateY(-50%) rotate(-45deg);
  transition: transform 0.22s ease;
}

.aw-archetype-details[open] summary::after {
  margin-top: 0.08em;
  transform: translateY(-50%) rotate(45deg);
}

.aw-archetype-details summary:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.6);
  outline-offset: 2px;
  border-radius: 8px;
}

.aw-archetype-details .aw-archetype-details-panel {
  padding: 0 14px 14px;
  color: #cbd5e1;
}

.aw-archetype-details .section-title {
  display: none;
}

.aw-archetype-details .aw-archetype-scores {
  margin-top: 0 !important;
}

.aw-archetype-card--out {
  opacity: 0;
  transform: scale(0.97) translateY(18px);
  filter: blur(8px);
  transition: opacity 0.38s ease, transform 0.38s ease, filter 0.38s ease;
  pointer-events: none;
}

@keyframes awTapHintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.aw-archetype-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px var(--archetype-glow, rgba(167,139,250,0.5)));
}

.aw-archetype-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.aw-archetype-title-prefix {
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
  font-weight: 500;
  color: rgba(203, 213, 225, 0.72);
  letter-spacing: 0.06em;
}

.aw-archetype-title-name {
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 0 0 30px var(--archetype-glow, rgba(167,139,250,0.3));
  line-height: 1.2;
}

.aw-archetype-label {
  font-size: 0.9rem;
  color: var(--archetype-color, #a78bfa);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  opacity: 0.7;
  line-height: 1.5;
}

.aw-archetype-tagline {
  font-size: 0.95rem;
  color: rgba(232, 228, 239, 0.75);
  font-style: italic;
  margin: -8px 0 14px;
}

.aw-archetype-match-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 4px;
}

.aw-archetype-crossover {
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(233, 213, 255, 0.92);
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 12px;
  text-align: center;
}

.aw-match-stat {
  flex: 1 1 140px;
  max-width: 220px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.aw-match-stat-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(203, 213, 225, 0.65);
  margin-bottom: 4px;
}

.aw-match-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--archetype-color, #a5b4fc);
  text-shadow: 0 0 18px var(--archetype-glow, rgba(167, 139, 250, 0.35));
}

.aw-radar-panel {
  padding-top: 8px !important;
}

.aw-radar-wrap {
  width: 100%;
  max-width: 360px;
  min-height: 280px;
  margin: 0 auto;
  animation: awRadarIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.aw-radar-empty {
  color: rgba(203, 213, 225, 0.65);
  font-size: 0.9rem;
  padding: 48px 12px;
}

.aw-radar-svg {
  width: 100%;
  height: auto;
  display: block;
}

.aw-radar-polygon {
  transition: opacity 0.5s ease;
}

.aw-radar-dot {
  transition: cx 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              cy 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              r 0.4s ease;
}

.aw-radar-highlight-axis {
  animation: awRadarAxisPulse 2.2s ease-in-out infinite;
}

@keyframes awRadarIn {
  from {
    opacity: 0;
    transform: scale(0.42);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes awRadarAxisPulse {
  0%, 100% { stroke-opacity: 0.45; }
  50% { stroke-opacity: 0.85; }
}

.aw-compat-intro {
  font-size: 0.92rem;
  color: #a5b4fc;
  line-height: 1.65;
  margin-bottom: 10px;
}

.aw-compat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aw-compat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.aw-compat-name {
  color: #e2e8f0;
  font-size: 0.95rem;
}

.aw-compat-pct {
  color: var(--archetype-color, #a5b4fc);
  font-weight: 600;
  font-size: 0.9rem;
}

.aw-compat-empty {
  color: rgba(203, 213, 225, 0.7);
  font-size: 0.92rem;
  line-height: 1.6;
  list-style: none;
  padding: 8px 0;
}

.aw-archetype-persona {
  color: #d1d5db !important;
  font-size: 1.02rem;
  line-height: 1.75;
}

.aw-archetype-bar {
  height: 3px; border-radius: 2px;
  margin: 14px 0;
  background: linear-gradient(90deg, var(--archetype-color, #a78bfa) 0%, #a78bfa 100%);
  opacity: 0.6;
}

.aw-archetype-desc {
  color: #e8e4ef;
  font-size: clamp(1.05rem, 3.1vw, 1.22rem);
  line-height: 1.82;
  text-align: left;
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.aw-archetype-airole {
  color: #a78bfa;
  font-size: clamp(1rem, 2.9vw, 1.12rem);
  line-height: 1.82;
  text-align: left;
  white-space: pre-wrap;
  font-style: italic;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(167,139,250,0.06);
  border-radius: 8px;
  border-left: 2px solid var(--archetype-color, #a78bfa);
}

.aw-archetype-abilities,
.aw-archetype-modules,
.aw-archetype-biz {
  text-align: left;
  margin-top: 10px;
}

.aw-archetype-abilities .section-title,
.aw-archetype-modules .section-title,
.aw-archetype-biz .section-title {
  color: #fbbf24;
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 8px;
  display: block;
}

.aw-archetype-abilities ul,
.aw-archetype-modules ul,
.aw-archetype-biz ul {
  list-style: none; padding: 0;
}

.aw-archetype-abilities li {
  color: #e8e4ef;
  font-size: 1.02rem;
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
}

.aw-archetype-abilities li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--archetype-color, #a78bfa);
}

.aw-archetype-modules li {
  color: #e8e4ef;
  font-size: 1.02rem;
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  border-bottom: 1px solid rgba(167,139,250,0.06);
}

.aw-archetype-modules li:last-child { border-bottom: none; }

.aw-archetype-modules li::before {
  content: '✦';
  position: absolute; left: 0;
  color: var(--archetype-color, #a78bfa);
  font-size: 0.75rem;
}

.aw-archetype-biz li {
  color: rgba(232,228,239,0.7);
  font-size: 0.98rem;
  padding: 12px 0;
  position: relative;
  border-bottom: 1px solid rgba(167,139,250,0.08);
  list-style: none;
}

.aw-archetype-biz li:last-child {
  border-bottom: none;
}

.aw-biz-title {
  display: block;
  color: #e8e4ef;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
  line-height: 1.45;
}

.aw-biz-title::before {
  content: '✧';
  position: absolute;
  left: 0;
  top: 0.15em;
  color: #fbbf24;
  font-size: 0.7rem;
}

.aw-biz-blurb {
  display: block;
  padding-left: 16px;
  font-size: 0.88rem;
  line-height: 1.58;
  color: rgba(232,228,239,0.62);
  font-weight: 400;
}

@keyframes awCardIn {
  0% { opacity: 0; transform: scale(0.92) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- Final Choice Buttons ---------- */
.aw-archetype-scores {
  font-size: clamp(0.9rem, 2.6vw, 1.02rem) !important;
  line-height: 1.65;
}

.aw-final-choices {
  position: relative;
  z-index: 25;
  width: 100%; max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  display: flex; flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.aw-final-btn {
  display: block; width: 100%;
  padding: 18px 26px;
  border-radius: 14px;
  font-size: clamp(1.12rem, 3vw, 1.28rem);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: awChoiceIn 0.4s ease forwards;
  font-family: inherit;
  border: none;
}

.aw-final-btn.primary {
  background: linear-gradient(135deg, var(--archetype-color, #a78bfa), #a78bfa);
  color: #fff;
  box-shadow: 0 4px 20px var(--archetype-glow, rgba(167,139,250,0.3));
}

.aw-guest-mode-note {
  font-size: 0.78rem;
  color: #fde68a;
  text-align: center;
  line-height: 1.5;
  margin: 4px 0 0;
  opacity: 0;
  animation: awChoiceIn 0.4s ease 0.15s forwards;
}

.aw-final-btn.primary:hover {
  box-shadow: 0 6px 30px var(--archetype-glow, rgba(167,139,250,0.5));
  transform: translateY(-2px);
}

.aw-final-btn.secondary {
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.25);
  color: rgba(232,228,239,0.8);
}

.aw-final-btn.secondary:hover {
  background: rgba(167,139,250,0.16);
  border-color: rgba(167,139,250,0.5);
}

/* ---------- Skip：右下角点击前往首页 ---------- */
.aw-skip-hint {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
  max-width: min(18rem, 86vw);
  z-index: 40;
  margin: 0;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: right;
  color: rgba(167, 139, 250, 0.42);
  background: rgba(10, 8, 22, 0.45);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 999px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.aw-skip-hint:hover,
.aw-skip-hint:focus-visible {
  color: rgba(224, 213, 255, 0.95);
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(12, 10, 26, 0.62);
  box-shadow: 0 0 22px rgba(167, 139, 250, 0.12);
  outline: none;
}

.aw-skip-hint:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.45);
  outline-offset: 2px;
}

.aw-skip-hint:active {
  transform: scale(0.98);
}

/* ---------- HTML无Canvas降级 ---------- */
.aw-no-canvas #aw-canvas { display: none; }
.aw-no-canvas body {
  background:
    radial-gradient(circle at 30% 20%, rgba(167,139,250,0.12) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(251,191,36,0.06) 0%, transparent 40%),
    #0a0914;
  animation: awBgPulse 4s ease-in-out infinite alternate;
}

@keyframes awBgPulse {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .aw-container { padding: 16px 0 88px; }
  .aw-content { padding: 0 clamp(8px, 4vw, 18px) 28px; }
  .aw-stage-inner { max-height: min(48vh, 360px); }
  .aw-line { font-size: clamp(1.02rem, 3.5vw, 1.22rem); }
  .aw-line.highlight { font-size: clamp(1.08rem, 3.8vw, 1.32rem); }
  .aw-choices { gap: 10px; }
  .aw-choice { padding: 13px 16px; font-size: clamp(1.02rem, 3.5vw, 1.12rem); line-height: 1.42; }
  .aw-archetype-card { max-height: min(86vh, 680px); }
  .aw-archetype-card-body { padding: 20px 14px 12px; }
  .aw-archetype-card-footer { padding: 10px 14px 14px; }
  .aw-archetype-emoji { font-size: 3.2rem; }
  .aw-skip-hint { bottom: 16px; right: 16px; font-size: 0.76rem; padding: 8px 12px; max-width: min(17rem, 90vw); }
}

/* ---------- 行动 GPS（测评报告） ---------- */
.aw-pathway-card {
  margin: 0;
  padding: 14px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.28);
}

/* 5 步成长地图 */
.aw-stepmap-wrap { margin: 2px 0 16px; }
.aw-stepmap-title {
  font-size: 0.78rem;
  color: rgba(167, 139, 250, 0.85);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.aw-stepmap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}
.aw-stepmap-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  text-align: center;
}
.aw-stepmap-node::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(148, 163, 184, 0.25);
  z-index: 0;
}
.aw-stepmap-node:last-child::after { display: none; }
.aw-stepmap-dot {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.9);
  border: 2px solid rgba(148, 163, 184, 0.35);
  color: #94a3b8;
}
.aw-stepmap-name {
  font-size: 0.68rem;
  line-height: 1.25;
  color: #94a3b8;
  max-width: 4.5em;
}
.aw-stepmap-node--done .aw-stepmap-dot {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(167, 139, 250, 0.6);
  color: #e9d5ff;
}
.aw-stepmap-node--done::after { background: rgba(167, 139, 250, 0.5); }
.aw-stepmap-node--current .aw-stepmap-dot {
  background: #00ffd0;
  border-color: #00ffd0;
  color: #06241f;
  box-shadow: 0 0 0 4px rgba(0, 255, 208, 0.18);
}
.aw-stepmap-node--current .aw-stepmap-name { color: #00ffd0; font-weight: 700; }
.aw-stepmap-here {
  font-size: 0.62rem;
  color: #06241f;
  background: #00ffd0;
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 700;
}

.aw-track-note {
  margin: 12px 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: #bae6fd;
  font-size: 0.88rem;
  line-height: 1.55;
}

.aw-track-note--diff {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

/* 「现在只做这一件事」醒目卡片 */
.aw-onlything {
  border-radius: 14px;
  padding: 16px 16px 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(0, 255, 208, 0.14), rgba(99, 102, 241, 0.18));
  border: 1px solid rgba(0, 255, 208, 0.4);
}
.aw-onlything-head {
  font-size: 0.9rem;
  font-weight: 700;
  color: #00ffd0;
  margin-bottom: 8px;
}
.aw-onlything-task {
  margin: 0 0 14px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #f8fafc;
  font-weight: 600;
}
.aw-onlything-btn {
  display: inline-block;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 10px;
  background: #00ffd0;
  color: #06241f;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.aw-onlything-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 255, 208, 0.3);
}

/* 为什么做这一步 */
.aw-why {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid rgba(167, 139, 250, 0.6);
}
.aw-why-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: 6px;
}
.aw-why-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* 完整路线折叠区 */
.aw-fullmap {
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
  padding-top: 10px;
}
.aw-fullmap-summary {
  cursor: pointer;
  font-size: 0.84rem;
  color: #c4b5fd;
  list-style: none;
  padding: 4px 0;
  user-select: none;
}
.aw-fullmap-summary::-webkit-details-marker { display: none; }
.aw-fullmap-body { padding-top: 10px; }
.aw-pathway-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.aw-path-phase {
  font-size: 0.82rem;
  font-weight: 700;
  color: #00ffd0;
}
.aw-path-gate {
  font-size: 0.78rem;
  color: #c4b5fd;
}
.aw-path-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(167, 139, 250, 0.75);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.aw-path-north-text,
.aw-path-task-text {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #f1f5f9;
}
.aw-path-task-text {
  color: #fde68a;
}
.aw-path-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.aw-path-meta-item p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #cbd5e1;
}
.aw-path-byproduct,
.aw-path-pitfall,
.aw-path-milestone,
.aw-path-context {
  font-size: 0.84rem;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0 0 8px;
}
.aw-path-pitfall strong,
.aw-path-byproduct strong {
  color: #fca5a5;
}
.aw-path-sop {
  margin: 12px 0 0;
  padding-left: 0;
  list-style: none;
}
.aw-path-sop li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #e2e8f0;
}
.aw-path-step-idx {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.35);
  color: #e9d5ff;
  font-size: 0.72rem;
  line-height: 1.4rem;
  text-align: center;
}
.aw-path-tools {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aw-tool-chip,
.aw-tool-chip--primary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.5);
  color: #e2e8f0;
  cursor: pointer;
}
.aw-tool-chip--primary {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(99, 102, 241, 0.2);
}
.aw-tool-chip-name {
  font-weight: 600;
  font-size: 0.88rem;
}
.aw-tool-chip-reason {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 4px;
}
.aw-modules-note {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 10px;
}
.aw-path-gate-wrap {
  margin-top: 14px;
}
.aw-path-gate-wrap .opc-gate-card {
  margin-top: 0;
  background: rgba(15, 23, 42, 0.45);
}
.aw-path-eval-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.aw-path-eval-link {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.35);
  color: #e9d5ff;
  font-size: 0.8rem;
  text-decoration: none;
}
.aw-path-eval-link--ghost {
  background: transparent;
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.aw-banner-eval {
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #c4b5fd;
  font-size: 0.78rem;
  text-decoration: none;
}

@media (max-width: 380px) {
  .aw-container { padding: 12px 0 88px; }
  .aw-stage-inner { max-height: min(46vh, 300px); }
  .aw-stage-glass { padding: 0.9rem clamp(0.75rem, 4vw, 1.2rem); }
  .aw-choices { gap: 8px; max-width: 100%; }
  .aw-choice { padding: 11px 14px; font-size: 0.98rem; line-height: 1.38; border-radius: 10px; }
  .aw-archetype-card { border-radius: 12px; max-height: min(85vh, 640px); }
  .aw-archetype-card-body { padding: 18px 12px 10px; }
  .aw-archetype-card-footer { padding: 10px 12px 12px; }
  .aw-archetype-title-name { font-size: 1.48rem; }
  .aw-archetype-title-prefix { font-size: 0.88rem; }
  .aw-archetype-desc { font-size: 0.98rem; line-height: 1.65; }
  .aw-final-btn { padding: 14px 20px; font-size: 1.05rem; }
}
