/* ============================================================
   默认主题 (Classic Graph) - CSS 变量定义
   所有颜色通过变量引用，支持主题切换
   ============================================================ */
:root,
.theme-default {
  --ink: #16171d;
  --muted: #626b7a;
  --line: #dfe4ea;
  --surface: #ffffff;
  --soft: #f6f8f4;
  --teal: #0f8b8d;
  --coral: #f25f4c;
  --gold: #d69b19;
  --green: #3a8f54;
  --shadow: 0 18px 42px rgba(24, 35, 52, 0.12);

  /* 主题无关变量 */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-family: var(--font-family);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--soft);
  transition: background 0.4s ease;
}

button,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.app {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-brand {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
}
.topbar-brand:active {
  opacity: 0.7;
}
.topbar h1 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  font-size: 18px;
  padding: 6px 10px !important;
  min-width: auto;
  line-height: 1;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.view {
  display: none;
  padding: 18px;
  opacity: 0;
  animation: fadeSlideIn 0.28s ease forwards;
}

.view.active {
  display: block;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ink), #243645);
  color: #fff;
}

#graphCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 28px 24px;
}

.hero .primary-button {
  position: relative;
  z-index: 4;
  scroll-margin-top: 120px;
}

.hero h2 {
  width: min(340px, 100%);
  margin: 14px 0;
  font-size: 34px;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  width: min(360px, 100%);
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

@media (max-width: 420px) {
  .topbar {
    gap: 10px;
    padding: 14px 18px;
  }

  .topbar-brand {
    min-width: 0;
  }

  .topbar .eyebrow {
    max-width: 158px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .topbar-actions {
    flex-shrink: 0;
  }

  .hero {
    min-height: 310px;
  }

  #graphCanvas {
    opacity: 0.64;
  }

  .theme-mindlayer #graphCanvas {
    opacity: 0.74;
  }

  .theme-healing #graphCanvas {
    opacity: 0.46;
  }

  .hero-content {
    padding: 26px 24px;
  }

  .hero h2 {
    font-size: 30px;
    line-height: 1.18;
  }

  .hero p:not(.eyebrow) {
    line-height: 1.58;
  }
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.primary-button {
  background: var(--ink);
  color: #fff;
}

.primary-button:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:disabled {
  background: #aab2bd;
}

.secondary-button {
  background: #e9f3f2;
  color: #075e60;
}

.secondary-button:hover {
  background: #d6eae7;
}

.ghost-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.ghost-button:hover {
  border-color: var(--teal);
  color: var(--ink);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  font-size: 22px;
}

.metrics span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 22px 0 12px;
}

.section-head h3 {
  margin: 0;
  font-size: 20px;
}

.home-section-head {
  display: none;
}

#refNotice {
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
}

.tier-list,
.facet-list,
.report-list,
.upgrade-list,
.log-list {
  display: grid;
  gap: 12px;
}

.tier,
.invite-card,
.question-card,
.unlock-card,
.copy-card,
.log-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.invite-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  background: #f7fbfa;
}

.invite-card[hidden] {
  display: none;
}

.invite-type {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.invite-card strong,
.invite-card span {
  display: block;
}

.invite-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tier {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.tier-head,
.progress-row,
.type-row,
.action-row,
.wallet-grid,
.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.type-row {
  align-items: flex-start;
}

#mbtiType {
  min-width: 0;
  flex: 1 1 auto;
}

.tier h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.tier-price {
  color: var(--coral);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.tier p,
.unlock-card p,
.wallet-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.progress-row {
  color: var(--muted);
  font-size: 14px;
}

.progress-track {
  height: 8px;
  margin: 12px 0 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f3;
}

#progressBar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.35s ease;
}

.question-card {
  padding: 22px;
}

.question-card h2 {
  margin: 10px 0 20px;
  font-size: 23px;
  line-height: 1.35;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-button {
  width: 100%;
  min-height: 72px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  line-height: 1.5;
  transition: all 0.2s ease;
  cursor: pointer;
}

.option-button:hover {
  border-color: var(--teal);
  background: #f5faf9;
}

.option-button.active {
  border-color: var(--teal);
  background: #edf9f8;
  box-shadow: inset 4px 0 0 var(--teal);
}

.share-entry-gate {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--teal) 28%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 139, 141, 0.08), rgba(214, 155, 25, 0.08));
}

.share-entry-gate h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.share-entry-gate .eyebrow {
  color: color-mix(in srgb, var(--teal) 72%, #202534);
  font-weight: 900;
}

.share-entry-gate p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.gender-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gender-choice-grid button {
  min-height: 92px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
}

.gender-choice-grid button:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 22px rgba(15, 139, 141, 0.12);
}

.gender-choice-grid strong,
.gender-choice-grid span {
  display: block;
}

.gender-choice-grid strong {
  font-size: 18px;
  line-height: 1.25;
}

.gender-choice-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.action-row {
  margin-top: 20px;
  gap: 12px;
}

.action-row button {
  flex: 1;
  padding: 14px 16px !important;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.test-identity-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 16, 26, 0.68);
  backdrop-filter: blur(8px);
}

.test-identity-card {
  width: min(100%, 420px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface, #fff);
  color: var(--ink, #16171d);
  box-shadow: 0 24px 70px rgba(10, 16, 26, 0.28);
}

.test-identity-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid var(--line, #e2e6e9);
  border-radius: 12px;
  background: #f3f8f5;
  background: color-mix(in srgb, var(--primary, #2d8f6f) 7%, #fff);
}

.test-identity-person img {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  object-fit: cover;
}

.test-identity-person span,
.test-identity-person strong {
  display: block;
}

.test-identity-person span {
  margin-bottom: 3px;
  color: var(--muted, #68727d);
  font-size: 12px;
}

.test-identity-card h2 {
  margin: 0 0 8px;
  font-size: 23px;
  line-height: 1.3;
}

.test-identity-card > p {
  margin: 0 0 18px;
  color: var(--muted, #68727d);
  font-size: 13px;
  line-height: 1.65;
}

.test-identity-card label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
}

.test-identity-card input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line, #dce2e6);
  border-radius: 10px;
  background: #fff;
  color: #16171d;
  font-size: 16px;
}

.test-identity-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.test-identity-code-row button,
.test-identity-submit,
.test-identity-cancel {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.test-identity-code-row button {
  padding: 0 14px;
  background: color-mix(in srgb, var(--primary, #2d8f6f) 12%, #fff);
  color: var(--primary, #2d8f6f);
}

.test-identity-status {
  min-height: 22px;
  margin: 9px 0 !important;
  color: var(--primary, #2d8f6f) !important;
  font-weight: 700;
}

.test-identity-submit {
  width: 100%;
  background: var(--primary, #2d8f6f);
  color: #fff;
  font-size: 16px;
}

.test-identity-cancel {
  width: 100%;
  margin-top: 6px;
  background: transparent;
  color: var(--muted, #68727d);
}

.test-identity-code-row button:disabled,
.test-identity-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.result-head,
.wallet-head {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #1a2332 0%, #2a3f5c 50%, #3b5a7c 100%);
  box-shadow: 0 4px 20px rgba(26, 35, 50, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.wallet-head::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-head::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64,224,208,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-head .eyebrow {
  position: relative;
  z-index: 1;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
  font-weight: 500;
}

.wallet-head p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.75;
}

.result-head h2,
.wallet-head h2 {
  position: relative;
  z-index: 1;
  margin: 12px 0 6px;
  font-size: 42px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#mbtiType .mbti-type-code,
#mbtiType .mbti-type-nickname {
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

#mbtiType .mbti-type-nickname {
  margin-left: 0.24em;
}

.result-public-identity {
  position: relative;
  z-index: 2;
  margin-top: 14px;
}

.public-personality-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  color: inherit;
}

.public-personality-identity img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.public-personality-avatar-fallback {
  display: grid !important;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin: 0 !important;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary, #2d8f6f) 18%, #fff);
  color: var(--primary, #2d8f6f);
  font-size: 16px !important;
  font-weight: 900;
  opacity: 1 !important;
}

.public-personality-identity span,
.public-personality-identity strong {
  display: block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-personality-identity span {
  margin-bottom: 2px;
  font-size: 11px;
  opacity: 0.72;
}

.public-personality-identity strong {
  font-size: 14px;
}

.friend-public-identity {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--muted, #68727d);
  font-size: 12px;
  font-weight: 800;
}

.friend-public-identity img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.share-type-art-box > .public-personality-identity {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 8px;
  border-color: var(--line, #dde4e8);
  background: color-mix(in srgb, var(--primary, #2d8f6f) 8%, #fff);
  color: var(--ink, #16171d);
}

#confidence {
  padding: 8px 10px;
  border-radius: 999px;
  color: #14201f;
  background: #d9f3ed;
  font-size: 13px;
  font-weight: 900;
}

#typeTitle {
  margin: 0;
  color: rgba(255,255,255,0.78);
}

.dimension-list {
  margin-top: 16px;
  padding: 4px 18px;
  border-radius: 8px;
  background: #fff;
}

.cognitive-function-profile {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--border, #dfe6e9);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text, #24323d);
}

.cognitive-function-profile header,
.cognitive-function-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cognitive-function-profile header span {
  font-size: 11px;
  color: var(--muted, #677683);
}

.cognitive-function-profile header h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.cognitive-function-profile header > strong {
  max-width: 48%;
  text-align: right;
  color: var(--primary, #0f8b8d);
  font-size: 13px;
}

.cognitive-function-bars {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.cognitive-function-row > div {
  justify-content: flex-start;
  font-size: 13px;
}

.cognitive-function-row b {
  width: 24px;
  color: var(--primary, #0f8b8d);
}

.cognitive-function-row span {
  flex: 1;
}

.cognitive-function-row em {
  font-style: normal;
  font-weight: 700;
}

.cognitive-function-row > i {
  display: block;
  height: 7px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--soft-surface, #edf2f4);
}

.cognitive-function-row > i > u {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary, #0f8b8d);
  text-decoration: none;
}

.cognitive-function-profile > p {
  margin: 14px 0 0;
  color: var(--muted, #677683);
  font-size: 12px;
}

.dimension {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.dimension:last-child {
  border-bottom: 0;
}

.dimension-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 900;
}

.bar-track,
.share-bar-track {
  display: flex;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #edf0f3;
}

.bar-left,
.bar-right {
  transition: width 0.6s ease;
}

.bar-left {
  background: var(--teal);
}

.bar-right {
  background: var(--coral);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
  background: #eef8f7;
}

.match-card[hidden] {
  display: none;
}

.match-card span,
.match-card strong {
  display: block;
}

.match-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.match-card strong:last-child {
  color: var(--teal);
  font-size: 30px;
  white-space: nowrap;
}

.match-card-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 12px;
}

.match-card-art span {
  margin-top: 0;
}

.match-type-tile {
  min-width: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  grid-template-areas:
    "role role"
    "art name"
    "art title";
  align-items: center;
  gap: 5px 10px;
  padding: 10px;
  border: 1px solid rgba(15, 139, 141, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.match-type-role {
  grid-area: role;
  margin: 0;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.match-type-art {
  grid-area: art;
}

.match-type-name {
  grid-area: name;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.08;
  font-weight: 900;
}

.match-type-code,
.match-type-nickname {
  display: block;
  color: inherit;
  font-size: inherit;
  overflow-wrap: anywhere;
}

.match-type-tile small {
  grid-area: title;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.match-score-node {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.match-score-node span {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.25;
}

.match-score-node strong {
  color: #fff;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.tag-row span {
  padding: 8px 10px;
  border-radius: 999px;
  background: #f5efe4;
  color: #6d4a0b;
  font-size: 13px;
  font-weight: 800;
}

.type-art-card {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 128px) 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.type-art-card[hidden] {
  display: none;
}

.type-art-image,
.match-type-art,
.share-type-image {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}

.type-art-card img,
.match-type-art img,
.share-type-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.type-art-card img {
  max-height: 168px;
  box-shadow: 0 12px 28px rgba(21, 24, 32, 0.14);
}

.type-art-fallback-text {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 10px;
  color: var(--teal);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.type-art-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.type-art-meta strong {
  font-size: 18px;
}

.type-art-title,
.share-type-art-label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.34em;
  min-width: 0;
}

.type-art-code,
.type-art-nickname,
.share-type-art-code,
.share-type-art-nickname {
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.type-art-title.has-nickname .type-art-code::after,
.share-type-art-copy > span.has-nickname .share-type-art-code::after {
  content: ' ·';
}

.type-art-meta > span {
  color: var(--muted);
  line-height: 1.5;
}

.unlock-card {
  margin-top: 18px;
  padding: 18px;
  border-color: #ead9b4;
  background: #fffaf0;
}

.unlock-card h3 {
  margin: 8px 0 8px;
}

.facet,
.report-section,
.upgrade {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.facet strong,
.report-section strong,
.upgrade strong,
.facet span,
.report-section span,
.upgrade span {
  display: block;
}

.report-section > span,
.report-module > span { white-space: pre-line; }

.report-unlock-status { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: end; padding: 13px; border-radius: 8px; background: var(--surface-soft, #f4f7f5); }
.report-unlock-status strong { color: var(--primary); font-size: 28px; line-height: 1; }
.report-unlock-status i { grid-column: 1 / -1; height: 9px; overflow: hidden; border-radius: 999px; background: var(--line); }
.report-unlock-status b { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.report-unlock-status.is-full { color: #fff; background: #176b4a; }
.report-unlock-status.is-full strong { color: #fff; }
.report-unlock-status.is-full i { background: rgba(255,255,255,.25); }
.report-unlock-status.is-full b { background: #fff; }
.unlocked-value-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.unlocked-value-grid span { display: flex; gap: 6px; margin: 0; padding: 9px; border-radius: 8px; color: var(--text); background: var(--surface); font-size: 12px; }
.unlocked-value-grid i { color: var(--primary); font-style: normal; font-weight: 900; }
.report-upgrade-pro, .report-share-income { width: 100%; margin-top: 14px; }
.one-shot-package em { display: inline-block; margin-bottom: 8px; padding: 4px 8px; border-radius: 999px; color: var(--primary); background: var(--surface); font-size: 11px; font-style: normal; font-weight: 900; }
.one-shot-package ul { margin: 10px 0; padding: 0; list-style: none; text-align: left; }
.one-shot-package li { margin-top: 6px; font-size: 11px; line-height: 1.35; }
.one-shot-package li::before { content: '✓'; margin-right: 5px; font-weight: 900; }
.report-pdf-final { width: 100%; min-height: 50px; margin-top: 14px; font-weight: 900; }

.report-feedback-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(75, 152, 98, .28);
  border-radius: 8px;
  background: var(--surface, #fff);
}
.report-feedback-card > span { color: var(--accent, #4b9862); font-size: 12px; font-weight: 900; }
.report-feedback-card h3 { margin: 6px 0 4px; font-size: 20px; line-height: 1.35; }
.report-feedback-card p { margin: 0; color: var(--muted, #667085); font-size: 13px; line-height: 1.65; }
.report-feedback-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.report-feedback-actions button {
  min-height: 44px;
  padding: 8px 5px;
  border: 1px solid rgba(75, 152, 98, .3);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: var(--text, #1f2937);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}
.report-feedback-actions button.selected { background: var(--accent, #4b9862); color: #fff; border-color: var(--accent, #4b9862); }
.report-feedback-actions button:disabled { opacity: .62; }
.report-feedback-card > small { display: block; margin-top: 10px; color: var(--muted, #667085); font-size: 12px; }

.facet span,
.report-section span,
.upgrade span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.55;
}

.facet-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.facet-intro {
  padding: 2px 2px 0;
}

.facet-intro strong,
.facet-intro span {
  display: block;
}

.facet-intro strong {
  color: var(--text, #18212b);
  font-size: 16px;
}

.facet-intro span {
  margin-top: 4px;
  color: var(--muted, #637083);
  font-size: 12px;
  line-height: 1.5;
}

.facet-detail-head b {
  color: var(--accent, #267a67);
  font-size: 13px;
  text-align: right;
}

.facet-detail-track {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-soft, #edf3ef);
}

.facet-detail-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent, #267a67);
}

.facet-detail span {
  font-size: 13px;
}

.report-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.report-section {
  background: #fbfcfd;
}

.report-output-card {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.report-output-card strong {
  display: block;
  margin-bottom: 10px;
}

.report-output-card:empty,
.report-section:empty,
.facet:empty,
.upgrade:empty {
  display: none;
}

.report-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.report-mode-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.report-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-module-head span {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.report-module.locked {
  background: #fffaf0;
  border-color: #ead9b4;
}

.report-module.locked .report-module-head span {
  color: var(--gold);
}

.report-module button {
  margin-top: 12px;
  width: 100%;
}

.upgrade-card {
  display: grid;
  gap: 12px;
}

.upgrade-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.upgrade-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff3cf;
  color: #7a4f00;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.upgrade-title-wrap strong,
.upgrade-title-wrap small {
  display: block;
}

.upgrade-title-wrap small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upgrade-copy {
  margin-top: 0 !important;
}

.upgrade-guidance-title {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.guidance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.guidance-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--teal) 18%, transparent);
  color: color-mix(in srgb, var(--teal) 72%, var(--ink));
  font-size: 12px;
  font-weight: 900;
}

.locked-pdf-button {
  box-shadow: none !important;
}

.share-entry-visual {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 18px;
  border-color: color-mix(in srgb, var(--teal) 45%, var(--line));
  color: #171923;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.91)),
    radial-gradient(circle at 78% 8%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 34%),
    linear-gradient(150deg, color-mix(in srgb, var(--teal) 16%, #fff), color-mix(in srgb, var(--gold) 10%, #fff));
}

.share-entry-visual h3 {
  margin: 4px 0 0;
  color: #171923;
  font-size: 27px;
  line-height: 1.08;
  text-align: center;
}

.share-entry-visual > p {
  max-width: 360px;
  margin: 8px auto 0;
  color: #5b6472;
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

.share-entry-visual .eyebrow {
  color: color-mix(in srgb, var(--teal) 78%, #101322);
  text-align: center;
}

.share-entry-title-line {
  display: block;
  word-break: keep-all;
}

.gender-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.gender-card-grid button {
  position: relative;
  min-height: 174px;
  padding: 11px 10px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 16px 30px rgba(22, 23, 29, 0.08);
}

.gender-card-grid button:hover,
.gender-card-grid button:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.gender-card-grid button::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 48px;
  background: linear-gradient(135deg, var(--teal), color-mix(in srgb, var(--teal) 55%, var(--gold)));
}

.gender-card-grid strong,
.gender-card-grid span {
  position: relative;
  z-index: 1;
  display: block;
}

.gender-card-grid strong {
  margin-top: 4px;
  color: #171923;
  font-size: 17px;
}

.gender-card-grid .gender-card-stat {
  margin-top: 54px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
}

.gender-portrait {
  position: relative;
  z-index: 1;
  display: block;
  width: 96px;
  height: 96px;
  margin: 2px auto 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, #ffe3cf 0 28%, transparent 29%),
    radial-gradient(circle at 38% 38%, #2b3348 0 3px, transparent 4px),
    radial-gradient(circle at 62% 38%, #2b3348 0 3px, transparent 4px),
    linear-gradient(135deg, #b58cff, #f4f0ff);
}

.gender-portrait-frame {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 2px auto 0;
  overflow: hidden;
  border-radius: 50%;
  background: #f5f6fb;
}

.gender-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gender-portrait::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 24px;
  width: 64px;
  height: 38px;
  border-radius: 60% 60% 46% 46%;
  background: #6f4cc8;
  transform: rotate(-8deg);
}

.gender-portrait::after {
  content: '';
  position: absolute;
  left: 31px;
  bottom: 17px;
  width: 50px;
  height: 28px;
  border-radius: 16px 16px 8px 8px;
  background: #6a7cff;
}

.gender-portrait.female {
  background:
    radial-gradient(circle at 50% 43%, #ffe1cf 0 28%, transparent 29%),
    radial-gradient(circle at 39% 39%, #2b3348 0 3px, transparent 4px),
    radial-gradient(circle at 61% 39%, #2b3348 0 3px, transparent 4px),
    linear-gradient(135deg, #dff9dc, #f4fff0);
}

.gender-portrait.female::before {
  top: 8px;
  left: 16px;
  width: 80px;
  height: 58px;
  border-radius: 56% 56% 44% 44%;
  background: #83c65f;
  transform: rotate(7deg);
}

.gender-portrait.female::after {
  background: #56bd7b;
}

.hot-badge {
  position: absolute;
  right: 12px;
  bottom: 45px;
  z-index: 2;
  min-width: 30px;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.share-entry-start {
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
}

.theme-mindlayer .share-entry-visual,
.theme-healing .share-entry-visual {
  color: #171923;
}

.theme-mindlayer .share-entry-visual h3,
.theme-mindlayer .share-entry-visual .gender-card-grid strong,
.theme-healing .share-entry-visual h3,
.theme-healing .share-entry-visual .gender-card-grid strong {
  color: #171923;
}

.theme-mindlayer .share-entry-visual > p,
.theme-healing .share-entry-visual > p {
  color: #5b6472;
}

.one-shot-guide-card {
  display: grid;
  gap: 18px;
  padding: 18px 0 6px;
}

.one-shot-guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.65;
}

.one-shot-guide-art {
  min-height: 210px;
  border-radius: 8px;
  background: center / cover no-repeat url('/assets/oneshot-hidden-personality.png');
}

.one-shot-guide-art.calibrate {
  background:
    radial-gradient(circle at 72% 34%, color-mix(in srgb, var(--gold) 70%, #fff) 0 9px, transparent 10px),
    radial-gradient(circle at 26% 36%, color-mix(in srgb, var(--teal) 75%, #fff) 0 12px, transparent 13px),
    linear-gradient(135deg, rgba(255,255,255,0.96), color-mix(in srgb, var(--teal) 16%, #fff));
  border: 1px solid var(--line);
}

.one-shot-guide-art.calibrate::before {
  content: '人格校准';
  display: grid;
  min-height: 210px;
  place-items: center;
  color: var(--teal);
  font-size: 32px;
  font-weight: 900;
}

.analysis-active {
  min-height: 100vh;
}

.analysis-active > :not(#analysisPanel) {
  display: none !important;
}

.analysis-panel {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 120px);
  padding: 28px;
  text-align: center;
}

.analysis-panel h2 {
  margin: 10px 0 22px;
  font-size: 26px;
  line-height: 1.35;
}

.analysis-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f3;
}

.analysis-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
  transition: width 0.12s ease;
}

#analysisProgressText {
  margin-top: 16px;
  color: var(--teal);
  font-size: 38px;
  line-height: 1;
}

#analysisCopy {
  margin: 12px auto 0;
  max-width: 320px;
  color: var(--muted);
  line-height: 1.7;
}

.one-shot-result .result-head {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.72) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.72) 1px, transparent 1px),
    linear-gradient(135deg, #fff 0%, color-mix(in srgb, var(--teal) 10%, #fff) 55%, color-mix(in srgb, var(--coral) 12%, #fff) 100%);
  background-size: 28px 28px, 28px 28px, auto;
  color: color-mix(in srgb, var(--teal) 60%, var(--ink));
  box-shadow: none;
}

.one-shot-result .result-head h2,
.one-shot-result .result-head p,
.one-shot-result #confidence {
  -webkit-text-fill-color: currentColor;
  color: color-mix(in srgb, var(--teal) 62%, var(--ink));
}

.one-shot-result .unlock-card {
  border-color: color-mix(in srgb, var(--coral) 30%, var(--line));
  background: color-mix(in srgb, var(--coral) 7%, #fff);
}

.one-shot-paywall {
  display: grid;
  gap: 18px;
}

.admin-experience-unlock {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #7c3aed;
  background: #f5f3ff;
  color: #2e1065;
  border-radius: 8px;
}

.admin-experience-unlock > strong,
.admin-experience-unlock > span {
  display: block;
}

.admin-experience-unlock > span {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.admin-experience-unlock > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.admin-experience-unlock button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: #6d28d9;
  color: #fff;
  font-weight: 700;
}

.progressive-conversion-bridge {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, #dfe7e1);
  background: color-mix(in srgb, var(--primary) 7%, #fff);
  border-radius: 8px;
}

.progressive-achievement {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.progressive-conversion-bridge h3 {
  margin: 12px 0 8px;
  font-size: 20px;
  line-height: 1.35;
  color: var(--text);
}

.progressive-conversion-bridge p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.progressive-value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 13px 0;
}

.progressive-value-grid span {
  padding: 8px 6px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, #e6e9e7);
  background: color-mix(in srgb, var(--surface) 94%, #fff);
  color: var(--text);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.progressive-share-first {
  width: 100%;
}

.one-shot-stage-complete {
  display: inline-flex;
  margin-top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.one-shot-guide-card h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.35;
  color: var(--text);
}

.one-shot-stage-gains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
}

.one-shot-stage-gains span {
  padding: 7px 5px;
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  color: var(--text);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.one-shot-subtype-example {
  display: block;
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

.one-shot-paywall-head {
  display: grid;
  gap: 4px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.one-shot-paywall-head p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.one-shot-paywall-head span {
  margin: 0;
}

.one-shot-paywall-head strong,
.one-shot-paywall-head em {
  color: var(--coral);
  font-style: normal;
}

.one-shot-countdown-time {
  display: inline-block;
  min-width: 108px;
  color: var(--coral);
  font-size: clamp(40px, 12vw, 58px);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 0.92;
  text-shadow: 0 12px 26px color-mix(in srgb, var(--coral) 24%, transparent);
}

.one-shot-rarity {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.64) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.64) 1px, transparent 1px),
    #fff;
  background-size: 24px 24px, 24px 24px, auto;
}

.one-shot-rarity span,
.one-shot-rarity p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.one-shot-rarity strong {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 10px;
  color: color-mix(in srgb, var(--teal) 58%, var(--ink));
  font-size: clamp(54px, 15vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
  white-space: nowrap;
}

.one-shot-type-code {
  display: inline-block;
}

.one-shot-type-suffix {
  display: inline-block;
  margin-left: 0;
  color: color-mix(in srgb, var(--muted) 84%, var(--ink));
  font-size: 0.9em;
  letter-spacing: 0;
}

.one-shot-rarity em {
  justify-self: start;
  margin-top: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.35;
}

.one-shot-package-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.one-shot-package {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  min-height: 84px;
  padding: 13px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--coral) 22%, var(--line));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 24px rgba(22, 23, 29, 0.08);
}

.one-shot-package.muted {
  color: color-mix(in srgb, var(--ink) 75%, #fff);
  background: color-mix(in srgb, var(--line) 28%, #fff);
}

.one-shot-package.recommended {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  background: color-mix(in srgb, var(--gold) 8%, #fff);
}

.one-shot-package.primary {
  background: var(--coral);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 16px 28px color-mix(in srgb, var(--coral) 26%, transparent);
}

.one-shot-package b {
  position: absolute;
  right: 12px;
  top: -12px;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ef3f34;
  color: #fff;
  font-size: 13px;
  line-height: 26px;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(239, 63, 52, 0.26);
}

.one-shot-package span {
  justify-self: end;
  color: color-mix(in srgb, var(--teal) 58%, var(--ink));
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.one-shot-package s {
  margin-left: 4px;
  color: inherit;
  opacity: 0.55;
  font-size: 0.56em;
  font-weight: 800;
}

.one-shot-package strong {
  font-size: 18px;
  line-height: 1.18;
}

.one-shot-package small,
.one-shot-package i {
  grid-column: 1 / -1;
  color: inherit;
  opacity: 0.9;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.one-shot-package small {
  color: color-mix(in srgb, var(--muted) 90%, var(--ink));
}

.one-shot-package.primary small {
  color: inherit;
}

.one-shot-package.primary span {
  color: #fff;
}

.one-shot-package .guidance-tags {
  justify-content: inherit;
}

.one-shot-package.primary .guidance-tags span {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.one-shot-main-unlock {
  min-height: 58px;
  font-size: 20px;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--teal) 22%, transparent);
}

.one-shot-buyer-line,
.one-shot-safe-note,
.one-shot-benefit-title {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.one-shot-benefit-title {
  color: color-mix(in srgb, var(--coral) 58%, var(--gold));
}

.one-shot-benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  font-weight: 800;
  color: var(--ink);
}

.one-shot-benefit-grid span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  line-height: 1.35;
}

.one-shot-benefit-grid span.muted {
  color: color-mix(in srgb, var(--muted) 50%, #fff);
  text-decoration: line-through;
}

.one-shot-benefit-grid i {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 56%, #fff);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
}

.one-shot-safe-note {
  color: color-mix(in srgb, var(--teal) 70%, #4baf61);
}

@media (max-width: 380px) {
  .one-shot-package-grid {
    gap: 9px;
  }

  .one-shot-package {
    min-height: 82px;
    padding: 12px;
  }

  .one-shot-package strong {
    font-size: 17px;
  }

  .one-shot-package span {
    font-size: 23px;
  }

  .one-shot-package small,
  .one-shot-package i {
    font-size: 12px;
  }

  .one-shot-benefit-grid {
    font-size: 13px;
    gap: 8px;
  }
}

.one-shot-preview-list {
  display: grid;
  gap: 14px;
}

.one-shot-preview {
  min-height: 188px;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

.one-shot-preview p {
  margin: 0;
  color: color-mix(in srgb, var(--teal) 22%, #b9b0db);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.one-shot-preview h4 {
  margin: 2px 0 18px;
  color: color-mix(in srgb, var(--teal) 55%, #6f32c9);
  font-size: 28px;
}

.blur-preview {
  min-height: 88px;
  padding: 16px;
  border-radius: 8px;
  color: transparent;
  text-shadow: 0 0 10px rgba(22, 23, 29, 0.42);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--teal) 16%, #fff), transparent 42%),
    linear-gradient(#f5f6fa, #fff);
  filter: blur(2px);
  line-height: 1.9;
}

.one-shot-unlocked-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--teal) 24%, var(--line));
  background: color-mix(in srgb, var(--teal) 7%, #fff);
}

.one-shot-unlocked-card h3,
.one-shot-unlocked-card p {
  margin: 0;
}

.one-shot-unlocked-note {
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--teal) 18%, var(--line));
  color: color-mix(in srgb, var(--muted) 78%, var(--ink));
  font-weight: 800;
  line-height: 1.65;
}

/* 雷达图 */
.radar-chart {
  margin-top: 18px;
  position: relative;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.radar-chart svg {
  width: 100%;
  height: auto;
  display: block;
}
.radar-labels {
  display: flex;
  justify-content: space-around;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 0 12px;
}
.radar-labels span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.radar-labels .radar-left {
  color: var(--teal);
}
.radar-labels .radar-right {
  color: var(--coral);
}

/* 职业倾向卡片 */
.career-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdfe;
}
.career-card:empty,
.relation-card:empty {
  display: none;
}
.career-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.career-card .career-style {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}
.career-card .career-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.career-card .career-tag {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  background: #eef2f7;
  color: var(--ink);
}
.career-list {
  display: grid;
  gap: 8px;
}
.career-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.career-item .career-name {
  font-weight: 600;
}
.career-item .career-match {
  font-size: 13px;
  color: var(--teal);
  font-weight: 700;
  min-width: 40px;
  text-align: right;
}
.career-item .career-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  display: none;
}
.career-avoid {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff8f6;
  border: 1px solid #fce4dc;
  font-size: 13px;
  color: var(--coral);
  line-height: 1.6;
}

/* 关系匹配卡片 */
.relation-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fefdfb;
}
.relation-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}
.relation-finder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.relation-finder select {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  min-width: 0;
  width: 100%;
}
.relation-finder button {
  padding: 6px 16px;
  background: var(--teal);
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
}
.relation-result {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}
.relation-result .match-score {
  font-size: 48px;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}
.relation-result .match-level {
  font-size: 16px;
  font-weight: 600;
  margin: 6px 0 8px;
}
.relation-result .match-summary {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.best-matches {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}
.best-match-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f6f8fa;
  font-size: 14px;
}
.best-match-row .bm-type {
  font-weight: 600;
  min-width: 48px;
}
.best-match-row .bm-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.best-match-row .bm-score {
  color: var(--teal);
  font-weight: 700;
  text-align: right;
}

@media (max-width: 520px) {
  .relation-finder {
    grid-template-columns: 1fr;
  }
  .relation-finder span {
    display: none;
  }

  .poster-head {
    align-items: stretch;
    flex-direction: column;
  }

  .poster-head button {
    width: 100%;
  }
}

.share-card {
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--ink));
}

.share-card[hidden] {
  display: none !important;
}

.share-card h2 {
  margin: 12px 0 4px;
  font-size: 42px;
}

.share-card p:not(.eyebrow) {
  margin: 0;
  color: rgba(255,255,255,0.78);
}

#shareBars {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.share-bar {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.share-bar-track span:first-child {
  background: #fff;
}

.share-bar-track span:last-child {
  background: var(--gold);
}

.match-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
}

.match-box[hidden] {
  display: none;
}

.match-box strong {
  font-size: 28px;
}

.share-type-art-box {
  display: grid;
  grid-template-columns: minmax(0, 118px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
}

.share-type-art-box--pair {
  grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
  align-items: stretch;
}

.share-type-art-box[hidden] {
  display: none;
}

.share-type-art-box img {
  width: 100%;
  max-height: 118px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.share-type-art-single {
  display: grid;
  grid-template-columns: minmax(0, 118px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.share-type-tile {
  min-width: 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  grid-template-areas:
    "role role"
    "image name"
    "image title";
  align-items: center;
  gap: 5px 10px;
  align-content: center;
}

.share-type-role {
  grid-area: role;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 900;
}

.share-type-tile .share-type-image {
  grid-area: image;
}

.share-type-tile strong {
  grid-area: name;
  display: grid;
  gap: 2px;
  color: #fff;
  font-size: 17px;
  line-height: 1.08;
}

.share-type-tile small {
  grid-area: title;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.share-match-score-node {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.share-match-score-node span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.share-match-score-node strong {
  color: #fff;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.share-type-art-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.share-type-art-copy span {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.share-type-art-copy > span {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.34em;
}

.share-type-art-copy small {
  color: rgba(255,255,255,0.74);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.copy-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
}

.copy-card label {
  font-weight: 900;
}

.copy-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.poster-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.poster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.poster-head h3 {
  margin: 0;
  font-size: 18px;
}

.poster-head button {
  min-height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

.poster-card img {
  display: block;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8faf9;
  box-shadow: 0 12px 28px rgba(21, 24, 32, 0.1);
}

.poster-card img:not([src]) {
  display: none;
}

.wallet-grid {
  margin-top: 16px;
  gap: 12px;
}

.wallet-grid div {
  flex: 1;
  padding: 20px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wallet-grid div:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transform: translateY(-1px);
}

.wallet-grid span,
.wallet-grid strong {
  display: block;
}

.wallet-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.wallet-grid strong {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.log-list {
  margin-top: 18px;
}

.log-item {
  padding: 14px;
}

.log-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.log-item strong:last-child {
  color: var(--teal);
  white-space: nowrap;
}

.test-payment-sheet-open {
  overflow: hidden;
}

.test-payment-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(12, 18, 28, 0.54);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.test-payment-sheet-overlay.is-visible {
  opacity: 1;
}

.test-payment-sheet {
  position: relative;
  width: min(100%, 520px);
  max-height: 88vh;
  max-height: 88svh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 20px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 -18px 48px rgba(12, 18, 28, 0.22);
  transform: translateY(28px);
  transition: transform 0.24s ease;
}

.test-payment-sheet-overlay.is-visible .test-payment-sheet {
  transform: translateY(0);
}

.test-payment-sheet-handle {
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--line);
}

.test-payment-sheet-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.test-payment-sheet > .eyebrow {
  margin: 0 46px 8px 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.test-payment-sheet-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.test-payment-sheet-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.test-payment-sheet-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.test-payment-sheet-heading strong {
  color: var(--coral);
  font-size: 28px;
  line-height: 1.05;
  text-align: right;
  white-space: nowrap;
}

.test-payment-sheet-heading strong small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.test-payment-sheet-benefits {
  display: grid;
  gap: 10px;
  margin: 18px 0 14px;
  padding: 0;
  list-style: none;
}

.test-payment-sheet-benefits li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.test-payment-sheet-benefits i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-style: normal;
}

.test-payment-sheet-trust {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.test-payment-sheet-actions {
  position: sticky;
  bottom: calc(-18px - env(safe-area-inset-bottom));
  display: grid;
  gap: 6px;
  margin: 0 -4px;
  padding: 4px 4px calc(18px + env(safe-area-inset-bottom));
  background: var(--surface);
}

.test-payment-sheet-actions .primary-button {
  width: 100%;
  min-height: 52px;
  font-size: 17px;
}

.test-payment-cancel {
  min-height: 40px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (min-width: 600px) {
  .test-payment-sheet-overlay {
    align-items: center;
    padding: 24px;
  }

  .test-payment-sheet {
    width: min(100%, 480px);
    border-bottom: 1px solid var(--line);
    border-radius: 16px;
    padding-bottom: 18px;
  }

  .test-payment-sheet-actions {
    bottom: -18px;
    padding-bottom: 18px;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  display: none;
  max-width: 84vw;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(22, 23, 29, 0.92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
}

.toast.show {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== 我的页面重设计 ========== */

/* --- 我的页头部卡片 --- */
.result-head,
.wallet-head {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2332 0%, #2a3f5c 50%, #3b5a7c 100%);
  box-shadow: 0 4px 20px rgba(26, 35, 50, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.wallet-head::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-head::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64,224,208,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-head .eyebrow {
  position: relative;
  z-index: 1;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
  font-weight: 500;
}

.wallet-head p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.75;
}

.result-head h2,
.wallet-head h2 {
  position: relative;
  z-index: 1;
  margin: 12px 0 6px;
  font-size: 42px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- 统计网格 --- */
.wallet-grid {
  margin-top: 16px;
  gap: 12px;
}

.wallet-grid div {
  flex: 1;
  padding: 20px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wallet-grid div:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transform: translateY(-1px);
}

.wallet-grid span,
.wallet-grid strong {
  display: block;
}

.wallet-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.wallet-grid strong {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
}

/* --- 操作按钮行 --- */
.action-row {
  margin-top: 20px;
  gap: 12px;
}

.action-row button {
  flex: 1;
  padding: 14px 16px !important;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.action-row .primary-button {
  background: linear-gradient(135deg, var(--teal) 0%, #2db89d 100%) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(45,184,157,0.25);
}

.action-row .primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45,184,157,0.32);
}

.action-row .secondary-button {
  background: var(--soft);
  border: 1px solid var(--line) !important;
  color: var(--ink);
}

#resultView > .action-row {
  flex-wrap: wrap;
}

#resultView > .action-row button {
  min-width: 0;
}

/* ========== 验证表单（重设计）========== */
.wallet-form {
  position: relative;
  margin-top: 24px;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface) 0%, rgba(245,247,250,0.5) 100%);
  border: 1px solid var(--line);
  overflow: hidden;
}

/* 表单顶部装饰条 */
.wallet-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), #40e0d0, var(--gold));
  border-radius: 16px 16px 0 0;
}

/* 标题区 */
.wallet-form h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.form-hint {
  margin: 0 0 20px;
  padding-left: 14px;
  border-left: 3px solid var(--teal);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* 表单标签 */
.wallet-form label {
  display: block;
  margin: 18px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.3px;
}

/* 输入框 */
.wallet-form input[type="text"],
.wallet-form input[type="tel"] {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #dde2ea;
  border-radius: 11px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: all 0.2s ease;
  -webkit-appearance: none;
}

.wallet-form input::placeholder {
  color: #aab2bd;
}

.wallet-form input:hover {
  border-color: #c0c8d4;
}

.wallet-form input:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(45,184,157,0.1), 0 2px 8px rgba(0,0,0,0.03);
}

.wechat-login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(58, 143, 84, 0.18);
  border-radius: 12px;
  background: rgba(58, 143, 84, 0.06);
}

.wechat-login-state {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.wechat-login-state strong {
  font-size: 15px;
  color: var(--ink);
}

.wechat-login-state span {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-login-panel .secondary-button {
  white-space: nowrap;
  background: #dceee0;
  color: #2f6f3a;
}

.phone-fallback {
  margin-top: 12px;
}

/* 短信验证码行 */
.sms-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.sms-row input {
  min-width: 0;
}

.sms-row button {
  white-space: nowrap;
  padding: 13px 18px !important;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

@media (max-width: 560px) {
  .wechat-login-panel {
    grid-template-columns: 1fr;
  }

  .wechat-login-panel .secondary-button {
    width: 100%;
  }

  .sms-row {
    grid-template-columns: 1fr;
  }

  .sms-row button {
    width: 100%;
  }
}

.sms-row button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(45,184,157,0.2);
}

.sms-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* 验证并保存按钮 */
.wallet-form .primary-button {
  margin-top: 22px;
  width: 100%;
  padding: 14px 20px !important;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--ink) 0%, #2c3e50 100%) !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(44,62,80,0.18);
  transition: all 0.25s ease;
}

.wallet-form .primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(44,62,80,0.25);
}

.wallet-form .primary-button:disabled {
  background: #c8ccd4 !important;
  box-shadow: none;
  cursor: not-allowed;
  transform: none !important;
}

/* 状态消息 */
.form-status {
  margin: 14px 0 0;
  font-size: 13px;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  animation: statusFadeIn 0.3s ease;
}

@keyframes statusFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-status.ok {
  color: var(--green);
  background: rgba(46,204,113,0.08);
  border: 1px solid rgba(46,204,113,0.15);
}

.form-status.err {
  color: var(--coral);
  background: rgba(231,76,60,0.08);
  border: 1px solid rgba(231,76,60,0.15);
}

/* ========== AI 深度解读入口卡片 ========== */
.ai-entry-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(139,92,246,0.04) 100%);
  border: 1px solid rgba(99,102,241,0.15);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.ai-entry-card:hover {
  box-shadow: 0 4px 16px rgba(99,102,241,0.08);
  transform: translateY(-1px);
}

.ai-entry-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(99,102,241,0.2);
}

.ai-entry-body {
  flex: 1;
  min-width: 0;
}

.ai-entry-body h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.ai-entry-body p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.ai-entry-body .primary-button {
  padding: 10px 20px !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(99,102,241,0.25);
  transition: all 0.2s ease;
}

.ai-entry-body .primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99,102,241,0.32);
}

/* ========== AI 对话页面 ========== */
.ai-chat-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 20px);
  max-height: 100dvh;
  overflow: hidden;
}

.ai-chat-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}

.ai-chat-top .ghost-button {
  flex-shrink: 0;
  padding: 6px 12px !important;
  font-size: 13px;
  border: none;
  background: var(--soft);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
}

.ai-chat-top div {
  min-width: 0;
}

.ai-chat-top strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.ai-chat-top span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--soft);
}

.ai-chat-empty {
  text-align: center;
  padding: 40px 16px;
  margin: auto;
}

.ai-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
  font-size: 36px;
}

.ai-chat-empty h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--ink);
}

.ai-chat-empty p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}

.ai-quick-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.ai-quick-btns button {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  color: var(--ink);
  text-align: left;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-quick-btns button:hover {
  border-color: #6366f1;
  background: rgba(99,102,241,0.04);
  transform: translateY(-1px);
}

/* 对话气泡 */
.ai-bubble {
  display: flex;
  animation: bubbleIn 0.25s ease;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ai-bubble.user {
  justify-content: flex-end;
}

.ai-bubble.assistant {
  justify-content: flex-start;
}

.ai-bubble-inner {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.ai-bubble.user .ai-bubble-inner {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ai-bubble.assistant .ai-bubble-inner {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

/* 打字指示器 */
.ai-bubble.ai-typing .ai-bubble-inner {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.ai-bubble.ai-typing .ai-bubble-inner span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a0aec0;
  animation: typingDot 1.4s infinite ease-in-out;
}

.ai-bubble.ai-typing .ai-bubble-inner span:nth-child(2) { animation-delay: 0.2s; }
.ai-bubble.ai-typing .ai-bubble-inner span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* 输入框行 */
.ai-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}

.ai-chat-input-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1.5px solid #dde2ea;
  border-radius: 24px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--soft);
  transition: all 0.2s ease;
  outline: none;
}

.ai-chat-input-row input:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.ai-chat-input-row input::placeholder {
  color: #aab2bd;
}

.ai-chat-input-row button {
  flex-shrink: 0;
  padding: 12px 20px !important;
  border-radius: 24px !important;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(99,102,241,0.25);
  transition: all 0.2s ease;
}

.ai-chat-input-row button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99,102,241,0.32);
}

.ai-chat-input-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

@media (min-width: 720px) {
  body {
    padding: 24px 0;
  }

  .app {
    min-height: calc(100vh - 48px);
    border-radius: 8px;
    overflow: hidden;
  }
}

/* ============================================================
   通用 UX 增强
   ============================================================ */

/* 焦点指示器 (键盘导航) */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus:not(:focus-visible) {
  outline: none;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--soft);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ========== 我的页面 (myView) ========== */

.privacy-center {
  border: 1px solid rgba(25, 34, 40, 0.1);
}

.privacy-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.privacy-center-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted, #68727a);
  font-size: 12px;
  font-weight: 800;
}

.privacy-center-head h3 {
  margin: 0;
}

#privacyStatusBadge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(15, 139, 141, 0.1);
  color: #0b7476;
  font-size: 12px;
}

#privacyStatusBadge[data-status="pending"] {
  background: rgba(214, 155, 25, 0.14);
  color: #8a5d00;
}

.privacy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.privacy-actions button:only-child,
.privacy-actions button:not([hidden]):last-child:nth-child(3) {
  grid-column: 1 / -1;
}

.privacy-delete-button {
  color: #a13b32;
  border-color: rgba(161, 59, 50, 0.28);
}

.privacy-retention-note {
  margin: 10px 0 0;
  color: var(--muted, #68727a);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 390px) {
  .privacy-actions {
    grid-template-columns: 1fr;
  }
}
.my-head {
  text-align: center;
  padding: 20px 24px 16px;
}

.tenant-admin-entry-button {
  border-color: rgba(15, 139, 141, 0.24);
  background: rgba(15, 139, 141, 0.09);
  color: var(--teal);
  font-weight: 800;
}

.boss-management-card[hidden] { display: none; }
#myHomeFooter[hidden] { display: none; }
.boss-management-card {
  margin: 4px 16px 16px;
  padding: 20px;
  border: 1px solid rgba(15, 139, 141, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 139, 141, 0.11), rgba(239, 117, 95, 0.08));
}
.boss-management-kicker { display: block; color: var(--teal); font-size: 11px; font-weight: 900; }
.boss-management-card h3 { margin: 6px 0 5px; font-size: 24px; }
.boss-management-card p { margin: 0 0 15px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.boss-management-card button { width: 100%; }
.boss-management-card.is-guided { animation: bossGuidePulse 1.2s ease-in-out 3; }
@keyframes bossGuidePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15, 139, 141, 0); }
  50% { box-shadow: 0 0 0 7px rgba(15, 139, 141, 0.16); }
}

.my-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.4px;
}

.my-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.my-universal-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  margin: 0 16px 16px;
  padding: 15px 16px;
  border: 1px solid rgba(103, 71, 239, 0.26);
  border-radius: 8px;
  background: #f7f5ff;
  color: var(--ink);
  text-decoration: none;
}

.my-universal-entry span {
  color: #6747ef;
  font-size: 11px;
  font-weight: 900;
}

.my-universal-entry strong {
  grid-column: 1;
  font-size: 15px;
  line-height: 1.45;
}

.my-universal-entry b {
  grid-column: 2;
  grid-row: 1 / 3;
  color: #6747ef;
  font-size: 14px;
}

.my-section {
  margin: 0 16px 16px;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

#myPhoneSection {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
}

#myPhoneSection .form-hint {
  margin-bottom: 4px;
}

#myPhoneSection input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

#myPhoneSection input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.12);
}

#verifyPhone {
  min-height: 48px;
}

.profile-section {
  display: grid;
  gap: 14px;
}

.profile-summary {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.profile-avatar,
.profile-avatar-fallback {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  background: rgba(15, 139, 141, 0.12);
  color: var(--teal);
  font-weight: 800;
}

.profile-summary h3 {
  margin: 0 0 4px;
}

.profile-summary p {
  margin: 0;
}

.profile-completeness {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.1);
  color: var(--teal);
  font-weight: 800;
  font-size: 13px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-form-flow {
  grid-template-columns: 1fr;
  gap: 12px;
}

.profile-form-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profile-form-grid label[hidden],
.profile-rising-fields label[hidden],
.profile-insights[hidden] {
  display: none;
}

.profile-form-grid span {
  font-size: 12px;
  color: var(--muted);
}

.profile-form-grid input,
.profile-form-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.profile-rising-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 139, 141, 0.04);
}

.profile-rising-fields[hidden] {
  display: none;
}

.profile-rising-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profile-rising-fields span {
  font-size: 12px;
  color: var(--muted);
}

.profile-rising-fields input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.profile-insights {
  display: grid;
  gap: 8px;
}

.profile-birthday-insights,
.profile-blood-insights {
  margin-top: -2px;
}

.profile-insight-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 139, 141, 0.05);
}

.profile-insight-card span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.profile-insight-card strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.profile-insight-card p {
  margin: 6px 0 0;
}

.profile-insight-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.profile-rising-trigger {
  width: 100%;
  min-height: 48px;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  font: inherit;
}

.profile-rising-trigger strong {
  font-size: 18px;
}

.profile-rising-trigger.has-rising-details {
  border-color: rgba(15, 139, 141, 0.28);
  background: rgba(15, 139, 141, 0.08);
}

.astro-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 24, 40, 0.52);
  backdrop-filter: blur(10px);
}

.astro-modal-card {
  position: relative;
  width: min(100%, 520px);
  max-height: min(82vh, 720px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.24);
}

.astro-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.astro-modal-eyebrow {
  display: block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.astro-modal-card h3 {
  margin: 6px 42px 14px 0;
  font-size: 24px;
  line-height: 1.18;
}

.astro-modal-section,
.astro-modal-highlight,
.astro-modal-summary,
.astro-modal-tip {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 139, 141, 0.05);
}

.astro-modal-section {
  padding: 12px;
}

.astro-modal-section h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.astro-modal-section p,
.astro-modal-highlight p,
.astro-modal-summary,
.astro-modal-tip {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.astro-modal-section p + p {
  margin-top: 6px;
}

.astro-modal-highlight {
  margin-top: 10px;
  padding: 13px;
}

.astro-modal-highlight span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.astro-modal-highlight strong {
  display: block;
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: 22px;
}

.astro-modal-highlight.secondary strong {
  margin-bottom: 0;
}

.astro-modal-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.astro-modal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.astro-modal-table th,
.astro-modal-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.5;
}

.astro-modal-table th {
  color: var(--muted);
  font-weight: 800;
}

.astro-modal-table td strong {
  color: var(--ink);
  white-space: nowrap;
}

.astro-modal-summary,
.astro-modal-tip {
  margin-top: 12px;
  padding: 12px;
}

.astro-modal-tip {
  background: rgba(246, 177, 122, 0.1);
}

@media (max-width: 520px) {
  .astro-modal-overlay {
    align-items: end;
    padding: 12px;
  }

  .astro-modal-card {
    width: 100%;
    max-height: 88vh;
    padding: 16px;
    border-radius: 18px 18px 0 0;
  }

  .astro-modal-card h3 {
    margin-right: 38px;
    font-size: 21px;
  }

  .astro-modal-table {
    min-width: 0;
    table-layout: fixed;
  }

  .astro-modal-table th,
  .astro-modal-table td {
    padding: 9px 6px;
    font-size: 12px;
    word-break: break-word;
  }

  .astro-modal-table th:nth-child(1),
  .astro-modal-table td:nth-child(1) {
    width: 46px;
  }

  .astro-modal-table th:nth-child(2),
  .astro-modal-table td:nth-child(2) {
    width: 74px;
  }

  .astro-modal-table td strong {
    white-space: normal;
  }
}

.my-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.my-section p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* 好友列表 */
.friend-row,
.inviter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.friend-row:last-child,
.inviter-row:last-child {
  border-bottom: none;
}

.friend-row strong,
.inviter-row strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.friend-row span,
.inviter-row span {
  font-size: 12px;
  color: var(--muted);
}

.friend-main {
  flex: 1;
  min-width: 0;
}

.friend-main strong,
.friend-main span {
  display: block;
}

.friend-pending {
  opacity: 0.9;
}

.friend-status-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.friend-progress {
  margin-top: 8px;
}

.friend-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.friend-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.12);
}

.friend-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.friend-relation-btn {
  font-size: 12px !important;
  padding: 6px 14px !important;
  min-height: 32px !important;
  white-space: nowrap;
}

/* 测试历史 */
.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.history-row:last-child {
  border-bottom: none;
}

.history-row strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.history-row span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.history-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.history-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.history-view-btn,
.history-share-btn {
  min-height: 32px !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  white-space: nowrap;
}

.history-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.retest-comparison-card {
  overflow: hidden;
  border: 1px solid rgba(15, 139, 141, 0.18);
  background: linear-gradient(150deg, var(--surface) 0%, rgba(15, 139, 141, 0.06) 100%);
}

.retest-card-head,
.retest-type-route,
.retest-dimension-row {
  display: grid;
  align-items: center;
}

.retest-card-head > *,
.retest-type-route > *,
.retest-dimension-row > * {
  min-width: 0;
}

.retest-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.retest-card-head span,
.retest-type-route small,
.retest-facet-changes > small {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.retest-card-head h3 { margin: 3px 0 0; font-size: 20px; }

.retest-card-head > strong {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.12);
  color: var(--primary);
  font-size: 12px;
}

.retest-card-head > strong[data-level="low"] { background: rgba(239, 139, 102, 0.14); color: #b9583b; }
.retest-card-head > strong[data-level="high"] { background: rgba(58, 143, 84, 0.14); color: #2e7a46; }

.retest-type-route {
  grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.retest-type-route > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.retest-type-route > div:last-child { text-align: right; }
.retest-type-route small { display: block; color: var(--muted); }
.retest-type-route strong { display: block; margin-top: 4px; color: var(--ink); font-size: 25px; }
.retest-type-route > span { color: var(--muted); text-align: center; font-size: 11px; font-weight: 800; }
.retest-type-route > span b { display: block; color: var(--primary); font-size: 18px; }

.retest-summary {
  margin: 14px 0 12px !important;
  color: var(--ink) !important;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}
.retest-dimension-list { display: grid; gap: 12px; }
.retest-dimension-row { grid-template-columns: 64px minmax(70px, 1fr) 92px; gap: 8px; }
.retest-dimension-row > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.retest-dimension-row > strong { color: var(--ink); font-size: 11px; text-align: right; }
.retest-dimension-row.stable > strong { color: var(--muted); }

.retest-dimension-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15,139,141,.22), rgba(239,139,102,.22));
}

.retest-dimension-track::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 1px;
  height: 14px;
  background: var(--line);
}

.retest-dimension-track i,
.retest-dimension-track b {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.retest-dimension-track i { background: var(--muted); }
.retest-dimension-track b { width: 13px; height: 13px; background: var(--primary); }

.retest-facet-changes { margin-top: 16px; }
.retest-facet-changes > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.retest-facet-changes span { padding: 7px 9px; border-radius: 8px; background: rgba(15,139,141,.08); color: var(--muted); font-size: 11px; }
.retest-facet-changes b { margin-right: 5px; color: var(--ink); }

.retest-boundary {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  padding: 11px;
  border-left: 3px solid var(--accent);
  background: rgba(239, 139, 102, 0.07);
}

.retest-boundary strong,
.retest-boundary span {
  font-size: 11px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}
.retest-boundary strong { color: var(--ink); }
.retest-boundary span { color: var(--muted); }

.measurement-quality-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, var(--primary));
}

.measurement-quality-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.measurement-quality-head span { color: var(--primary); font-size: 11px; font-weight: 900; }
.measurement-quality-head h3 { margin: 2px 0 0; color: var(--ink); font-size: 18px; }
.measurement-quality-head > strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 21px;
}
.measurement-quality-head > strong[data-grade="C"],
.measurement-quality-head > strong[data-grade="D"] { background: var(--accent); color: #271d15; }
.measurement-quality-label { margin: 10px 0 !important; color: var(--ink) !important; font-weight: 800; }
.measurement-quality-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.measurement-quality-metrics > div { min-width: 0; padding: 10px 8px; border-radius: 8px; background: var(--surface); }
.measurement-quality-metrics small { display: block; color: var(--muted); font-size: 9px; }
.measurement-quality-metrics b { display: block; margin-top: 4px; color: var(--ink); font-size: 17px; }
.measurement-quality-boundary { display: grid; gap: 4px; margin-top: 10px; padding: 10px; border-left: 3px solid var(--primary); background: color-mix(in srgb, var(--primary) 7%, transparent); }
.measurement-quality-boundary strong,
.measurement-quality-boundary span { overflow-wrap: anywhere; font-size: 11px; line-height: 1.55; }
.measurement-quality-boundary strong { color: var(--ink); }
.measurement-quality-boundary span { color: var(--muted); }
.measurement-quality-limit { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.55; }

@media (max-width: 380px) {
  .retest-dimension-row { grid-template-columns: 56px minmax(64px, 1fr) 78px; }
  .retest-dimension-row > strong { font-size: 10px; }
}

.my-section .wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.my-section .wallet-grid div {
  min-width: 0;
  padding: 16px 10px;
}

.my-section .wallet-grid strong {
  font-size: 20px;
  letter-spacing: 0;
}

@media (max-width: 420px) {
  .history-row {
    grid-template-columns: 1fr;
  }

  .history-actions {
    justify-items: start;
    width: 100%;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .history-action-buttons { justify-content: flex-start; }
}

/* 好友关系详情页 */
.relation-detail {
  padding: 24px 20px;
  text-align: left;
}

.relation-hero {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(15, 139, 141, 0.08), rgba(245, 199, 107, 0.1));
  box-shadow: var(--shadow);
}

.relation-pair-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.relation-type-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.relation-card-role {
  grid-column: 1 / -1;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.relation-type-art {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  color: var(--teal);
  font-size: 26px;
  font-weight: 900;
}

.relation-type-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.relation-type-copy {
  min-width: 0;
}

.relation-type-name {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.12;
  font-weight: 900;
}

.relation-type-code,
.relation-type-nickname {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.relation-type-nickname {
  margin-top: 4px;
}

.relation-type-copy small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.relation-score-orb {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.relation-score-orb span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.relation-score-orb strong {
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0;
}

.relation-score-orb small {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.relation-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.relation-insight-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.relation-insight-group h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.relation-insight-item + .relation-insight-item {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.relation-insight-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 13px;
}

.relation-insight-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.relation-detail h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
}

.match-score-big {
  font-size: 48px;
  font-weight: 900;
  color: var(--teal);
  margin-bottom: 4px;
  letter-spacing: -1px;
}

.match-level-big {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.match-summary-big {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 16px 0 0;
}

.compat-section {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--soft);
  text-align: left;
}

.compat-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.compat-section p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.relationship-contexts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 6px;
}

.relationship-context-btn {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.relationship-context-btn.active {
  border-color: var(--teal);
  color: var(--ink);
  background: rgba(15, 139, 141, 0.1);
  box-shadow: inset 0 0 0 1px rgba(15, 139, 141, 0.16);
}

.relationship-free-card,
.professional-lock-card,
.professional-advice {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}

.relationship-free-card > span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.relationship-free-card h3,
.professional-lock-card h3,
.professional-advice h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.professional-lock-card p,
.professional-advice p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.professional-advice-grid {
  display: grid;
  gap: 10px;
}

.professional-advice-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.professional-advice-grid strong,
.professional-advice-grid span {
  display: block;
}

.professional-advice-grid strong {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
}

.professional-advice-grid span,
.professional-advice small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.professional-advice small {
  display: block;
  margin-top: 12px;
}

/* 减弱动画偏好 */
@media (max-width: 720px) {
  .relation-pair-grid,
  .relation-insight-grid {
    grid-template-columns: 1fr;
  }

  .relation-score-orb {
    min-height: 96px;
  }
}

@media (max-width: 420px) {
  .relation-detail {
    padding: 18px 14px;
  }

  .relation-hero {
    padding: 12px;
  }

  .relation-type-card {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 10px;
  }

  .relation-type-name {
    font-size: 22px;
  }

  .relation-score-orb strong {
    font-size: 34px;
  }
}

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

/* 骨架屏加载状态 */
.skeleton {
  display: block;
  min-height: 1em;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--line) 25%, #e9ecf0 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 空状态 */
.empty-state {
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.empty-state::before {
  content: '📭';
  display: block;
  font-size: 36px;
  margin-bottom: 12px;
}

/* 加载覆盖层 */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--muted);
  font-size: 14px;
}

.loading-overlay::before {
  content: '';
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 错误重试 */
.error-retry {
  padding: 32px 18px;
  text-align: center;
  color: var(--coral);
}

.error-retry button {
  margin-top: 12px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--coral);
  background: transparent;
  color: var(--coral);
  font-weight: 800;
  cursor: pointer;
}

.error-retry button:hover {
  background: var(--coral);
  color: #fff;
}

/* --- 动态布局区块 --- */
.custom-block {
  padding: 16px 20px;
  margin: 12px 0;
  background: var(--surface);
  border-radius: 12px;
  line-height: 1.7;
  font-size: 14px;
  color: var(--ink);
}

.custom-block h3,
.custom-block h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.custom-block p {
  margin: 0 0 10px;
  color: var(--muted);
}

.custom-block a {
  color: var(--teal);
  text-decoration: underline;
}

/* 布局组件：图片横幅 */
.image-banner-block { padding: 0; background: transparent; }
.image-banner-block img { transition: transform .25s ease; }
.image-banner-block a:hover img { transform: scale(1.02); }

/* 布局组件：按钮组 */
.layout-button-group { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 16px 0; padding: 8px 4px; }
.layout-button-group .primary-button,
.layout-button-group .secondary-button,
.layout-button-group .ghost-button {
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 220px;
  text-align: center;
}

@media (max-width: 520px) {
  .gender-choice-grid {
    grid-template-columns: 1fr;
  }

  .gender-choice-grid button {
    min-height: 72px;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-summary {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .profile-completeness {
    grid-column: 2;
    justify-self: start;
  }

  #resultView > .action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #shareResult {
    order: 1;
  }

  #backHome {
    order: 2;
  }

  #downloadReportPdf {
    order: 3;
    grid-column: 1 / -1;
  }

  #mbtiType .mbti-type-code,
  #mbtiType .mbti-type-nickname {
    display: block;
  }

  #mbtiType .mbti-type-nickname {
    margin-left: 0;
    margin-top: 0.04em;
  }

  .type-art-card {
    grid-template-columns: minmax(0, 116px) minmax(0, 1fr);
    justify-items: stretch;
    gap: 12px;
  }

  .type-art-card img {
    max-width: 116px;
    max-height: 116px;
  }

  .type-art-meta {
    justify-items: start;
    text-align: left;
  }

  .type-art-title,
  .share-type-art-copy > span {
    display: grid;
    gap: 2px;
    line-height: 1.08;
  }

  .type-art-title.has-nickname .type-art-code::after,
  .share-type-art-copy > span.has-nickname .share-type-art-code::after {
    content: none;
  }

  .type-art-nickname,
  .share-type-art-nickname {
    display: block;
  }

  .match-card-art {
    grid-template-columns: 1fr;
  }

  .match-type-tile {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .match-score-node {
    min-height: 76px;
  }

  .share-type-art-box--pair,
  .share-type-art-single {
    grid-template-columns: 1fr;
  }

  .share-match-score-node {
    min-height: 72px;
  }
}
