:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-border: #d9e0ec;
  --ink: #172033;
  --text: #344256;
  --muted: #66758c;
  --line: #e7ecf4;
  --primary: #3154d5;
  --primary-strong: #223c96;
  --success: #0e9a6e;
  --danger: #c53a36;
  --shadow: 0 18px 40px rgba(20, 33, 56, 0.08);
  --font-body: "SF Pro Rounded", "ui-rounded", "Hiragino Maru Gothic ProN", "Hiragino Sans GB", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(89, 170, 247, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(109, 93, 246, 0.12), transparent 24%),
    radial-gradient(circle at 88% 22%, rgba(182, 117, 17, 0.08), transparent 22%),
    linear-gradient(180deg, #f9fbff 0%, var(--bg) 100%);
  transition: background 0.28s ease;
}

body.guan-weixiang-template-active {
  background:
    linear-gradient(145deg, rgba(73, 36, 142, 0.3) 0%, rgba(34, 24, 69, 0.12) 38%, rgba(172, 105, 223, 0.24) 100%),
    linear-gradient(180deg, #f7f0ff 0%, #efe5ff 42%, #e6d7fb 100%);
}

body.guan-weixiang-template-active .page-topbar {
  border-color: rgba(154, 109, 242, 0.24);
  background:
    linear-gradient(122deg, rgba(247, 240, 255, 0.98) 0%, rgba(234, 220, 255, 0.98) 48%, rgba(254, 244, 255, 0.96) 100%);
  box-shadow: 0 26px 62px rgba(84, 48, 142, 0.16);
}

body.guan-weixiang-template-active .panel {
  border-color: rgba(154, 109, 242, 0.18);
  box-shadow: 0 22px 58px rgba(84, 48, 142, 0.12);
}

a,
button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.bazi-page {
  padding: 20px 16px 32px;
}

.bazi-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.page-topbar,
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.page-topbar {
  border-radius: 20px;
  padding: 18px 24px 16px;
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border-color: rgba(204, 214, 232, 0.92);
  box-shadow: 0 24px 56px rgba(33, 51, 86, 0.12);
  background:
    linear-gradient(115deg, rgba(236, 232, 255, 0.98) 0%, rgba(244, 239, 255, 0.97) 28%, rgba(252, 244, 255, 0.95) 66%, rgba(244, 241, 255, 0.97) 100%);
}

.page-topbar::before,
.page-topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-topbar::before {
  inset: 24px 110px 28px 140px;
  border-radius: 40px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 72%);
  filter: blur(24px);
}

.page-topbar::after {
  background:
    radial-gradient(circle at 8% 16%, rgba(188, 167, 255, 0.24), transparent 20%),
    radial-gradient(circle at 88% 18%, rgba(210, 196, 255, 0.18), transparent 18%),
    radial-gradient(circle at 88% 72%, rgba(236, 214, 255, 0.18), transparent 18%),
    radial-gradient(circle at 22% 82%, rgba(197, 183, 255, 0.14), transparent 18%);
}

.page-topbar > * {
  position: relative;
  z-index: 1;
}

.topbar-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.topbar-link {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  padding-top: 6px;
}

.topbar-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 40px;
  margin: 0;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(170, 139, 255, 0.18);
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 14px 34px rgba(124, 92, 201, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 58%, #7c3aed 100%);
  box-shadow:
    0 0 0 5px rgba(124, 58, 237, 0.12),
    0 0 18px rgba(124, 58, 237, 0.34),
    0 0 34px rgba(99, 102, 241, 0.18);
  animation: baziStatusPulse 2.2s ease-in-out infinite;
}

@keyframes baziStatusPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.92;
    filter: saturate(1);
  }

  50% {
    transform: scale(1.14);
    opacity: 1;
    filter: saturate(1.18);
  }
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.22em;
  row-gap: 0.08em;
  margin: 0;
  color: var(--ink);
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: 0;
  max-width: 100%;
}

.hero-title .brand-word {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  background: linear-gradient(90deg, #59aaf7 0%, #6d5df6 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-home-link {
  display: inline-flex;
  align-items: baseline;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}

.hero-title .brand-vkquant {
  color: inherit;
}

.hero-title .brand-ai {
  color: inherit;
}

.hero-title .brand-copy {
  display: inline-block;
  flex: 1 1 360px;
  min-width: min(100%, 360px);
  color: var(--ink);
}

.hero-lead,
.hero-note,
.hero-status {
  margin: 0;
  line-height: 1.6;
}

.hero-lead {
  color: #53627d;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-note {
  max-width: 860px;
  color: #5d6a86;
  font-size: 15px;
}

.hero-status {
  color: #52627d;
  font-size: 14px;
  font-weight: 700;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(154, 173, 219, 0.4);
  background: rgba(255, 255, 255, 0.78);
  color: #435370;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-chip-bazi {
  border-color: rgba(202, 165, 91, 0.34);
  background: linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(255, 243, 214, 0.98));
  color: #8d6425;
}

.hero-chip-ziwei {
  border-color: rgba(173, 123, 184, 0.28);
  background: linear-gradient(180deg, rgba(248, 240, 255, 0.96), rgba(242, 231, 255, 0.98));
  color: #7c5193;
}

.hero-chip-astro {
  border-color: rgba(96, 137, 213, 0.3);
  background: linear-gradient(180deg, rgba(238, 246, 255, 0.96), rgba(228, 240, 255, 0.98));
  color: #335f9f;
}

.hero-chip-version {
  border-color: rgba(14, 154, 110, 0.34);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(209, 250, 229, 0.98));
  color: #047857;
  font-variant-numeric: tabular-nums;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.topbar-actions .member-session-summary {
  justify-items: end;
}

.topbar-actions .member-session-pill {
  max-width: min(100%, 280px);
}

.topbar-actions-secondary {
  margin-left: 0;
}

.topbar-home-link {
  text-decoration: none;
}

.mode-pill,
.ghost-button,
.primary-button,
.meta-pill,
.chart-pill,
.curve-tab {
  min-height: 40px;
  border-radius: 999px;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(169, 181, 226, 0.56);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ghost-button,
.primary-button,
.curve-tab {
  border: 1px solid var(--panel-border);
  padding: 0 16px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.ghost-button,
.curve-tab {
  background: #ffffff;
  color: var(--ink);
}

.primary-button {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
}

.ghost-button:hover,
.primary-button:hover,
.curve-tab:hover {
  transform: translateY(-1px);
}

.login-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  overflow: hidden;
  border-color: rgba(133, 145, 255, 0.24);
  padding: 0 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.18)),
    linear-gradient(135deg, rgba(118, 186, 255, 0.12), rgba(128, 109, 255, 0.14) 52%, rgba(194, 142, 255, 0.12));
  color: #24335d;
  font-weight: 900;
  letter-spacing: 0.015em;
  backdrop-filter: blur(18px) saturate(1.18);
  box-shadow:
    0 18px 36px rgba(91, 108, 192, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(124, 91, 225, 0.08);
}

.login-cta::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.46), transparent 26%, transparent 74%, rgba(255, 255, 255, 0.14)),
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.28), transparent 22%),
    radial-gradient(circle at 82% 78%, rgba(163, 122, 255, 0.1), transparent 28%);
  pointer-events: none;
}

.login-cta-label {
  position: relative;
  z-index: 1;
}

.login-cta-label {
  display: inline-flex;
  align-items: center;
  color: #22345f;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

.login-cta:hover {
  border-color: rgba(109, 118, 241, 0.3);
  box-shadow:
    0 22px 40px rgba(88, 106, 196, 0.16),
    0 0 0 4px rgba(115, 106, 246, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.ghost-button:disabled,
.primary-button:disabled,
.curve-tab:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.workspace {
  display: grid;
  gap: 16px;
  align-items: start;
}

.workspace-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(204, 214, 232, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 32px rgba(20, 33, 56, 0.07);
}

.workspace-tab {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.workspace-tab span {
  color: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.workspace-tab small {
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0.82;
}

.workspace-tab.active {
  border-color: rgba(49, 84, 213, 0.26);
  background:
    radial-gradient(circle at 92% 18%, rgba(89, 170, 247, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(49, 84, 213, 0.98), rgba(126, 94, 221, 0.94));
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(49, 84, 213, 0.2);
}

.workspace-tab:not(.active):hover {
  border-color: rgba(154, 173, 219, 0.46);
  background: rgba(248, 251, 255, 0.92);
  color: var(--primary-strong);
}

.workspace-panels {
  display: grid;
  min-width: 0;
}

.workspace[data-active-view="intake"] [data-workspace-panel]:not([data-workspace-panel="intake"]),
.workspace[data-active-view="preview"] [data-workspace-panel]:not([data-workspace-panel="preview"]),
.workspace[data-active-view="archetype"] [data-workspace-panel]:not([data-workspace-panel="archetype"]) {
  display: none;
}

.panel {
  border-radius: 24px;
  padding: 22px;
  display: grid;
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(89, 170, 247, 0.06), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 252, 255, 0.96));
}

.intake-panel {
  overflow: visible;
}

.result-panel {
  min-width: 0;
}

.panel-head,
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}

.panel-kicker {
  margin: 0 0 10px;
  color: #7a58d1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-note,
.result-summary-text,
.result-empty p,
.field-help,
.curve-state,
.inline-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.intake-form,
.result-body,
.curve-panel {
  display: grid;
  gap: 16px;
}

.intake-showcase {
  display: grid;
  gap: 18px;
}

.intake-showcase-shell {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(132, 107, 227, 0.26);
  background:
    radial-gradient(circle at top right, rgba(142, 111, 247, 0.14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(89, 170, 247, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(252, 248, 255, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow:
    0 24px 44px rgba(84, 73, 181, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.intake-showcase-shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 24px;
  border: 1px solid rgba(162, 139, 239, 0.18);
  pointer-events: none;
}

.intake-showcase-copy,
.intake-showcase-grid,
.intake-showcase-actions,
.intake-showcase-frame {
  position: relative;
  z-index: 1;
}

.intake-showcase-copy {
  display: grid;
  gap: 10px;
}

.intake-showcase-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(157, 129, 235, 0.26);
  background: rgba(255, 255, 255, 0.74);
  color: #7652ca;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.intake-showcase-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.intake-showcase-image-link {
  position: relative;
  display: block;
  text-decoration: none;
  outline: none;
}

.intake-showcase-copy p,
.intake-showcase-footnote,
.intake-showcase-point p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.intake-showcase-frame {
  margin: 0;
  padding: 10px;
  border-radius: 26px;
  border: 1px solid rgba(157, 129, 235, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 243, 255, 0.96));
  box-shadow:
    0 20px 38px rgba(84, 73, 181, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.intake-showcase-frame img {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(222, 227, 241, 0.96);
}

.intake-showcase-image-hint {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(157, 129, 235, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #7652ca;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 24px rgba(84, 73, 181, 0.12);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}

.intake-showcase-image-link:hover .intake-showcase-frame,
.intake-showcase-image-link:focus-visible .intake-showcase-frame {
  border-color: rgba(126, 91, 232, 0.5);
  background:
    radial-gradient(circle at top right, rgba(161, 123, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 240, 255, 0.98));
  box-shadow:
    0 24px 44px rgba(98, 82, 189, 0.16),
    0 0 0 4px rgba(140, 112, 240, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.intake-showcase-image-link:hover .intake-showcase-image-hint,
.intake-showcase-image-link:focus-visible .intake-showcase-image-hint {
  border-color: rgba(126, 91, 232, 0.38);
  background: rgba(255, 255, 255, 0.96);
  color: #673fc9;
  box-shadow:
    0 14px 28px rgba(98, 82, 189, 0.18),
    0 0 0 3px rgba(140, 112, 240, 0.1);
}

.intake-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.intake-showcase-point {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(162, 139, 239, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.intake-showcase-point-head {
  display: grid;
  gap: 8px;
}

.intake-showcase-point-featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 18px;
}

.intake-showcase-point-featured strong {
  font-size: 22px;
}

.intake-showcase-point-featured p {
  font-size: 16px;
}

.intake-showcase-point-label {
  color: #7a58d1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intake-showcase-point strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.intake-showcase-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.intake-showcase-actions .primary-button {
  min-width: 212px;
  justify-content: center;
}

.intake-showcase-footnote {
  flex: 1 1 280px;
  font-size: 13px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.field-help {
  font-size: 13px;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  padding: 0 14px;
  color: var(--ink);
  outline: none;
}

.field input[readonly] {
  background: #f7f9fc;
}

.field input:focus,
.field select:focus,
.region-result:focus-visible {
  border-color: rgba(49, 84, 213, 0.9);
  box-shadow: 0 0 0 4px rgba(49, 84, 213, 0.12);
}

.location-search-wrap {
  position: relative;
}

.location-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 120;
  display: grid;
  gap: 8px;
  max-height: min(520px, 58vh);
  overflow-y: auto;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(20, 33, 56, 0.14);
}

.location-results[hidden] {
  display: none;
}

.location-result-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.region-result {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  display: grid;
  gap: 2px;
}

.region-result strong {
  color: var(--ink);
  font-size: 14px;
}

.region-result small {
  color: var(--muted);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-actions .inline-status {
  flex: 1 1 220px;
}

.family-template-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(214, 223, 238, 0.98);
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.82);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.guan-weixiang-template-active .family-template-panel {
  border-color: rgba(154, 109, 242, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 239, 255, 0.9)),
    linear-gradient(135deg, rgba(122, 90, 245, 0.12), rgba(241, 199, 127, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 16px 34px rgba(84, 48, 142, 0.08);
}

.bazi-account-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(214, 223, 238, 0.98);
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.86);
}

.bazi-account-kicker,
.bazi-account-panel strong,
.bazi-account-panel small {
  display: block;
}

.bazi-account-kicker {
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.bazi-account-panel strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.bazi-account-panel small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.bazi-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

.family-template-head span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.family-template-head strong {
  color: var(--ink);
  font-size: 14px;
}

.family-template-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.family-template-button {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(214, 223, 238, 0.98);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.family-template-button:hover {
  transform: translateY(-1px);
  border-color: rgba(64, 92, 220, 0.34);
  box-shadow: 0 12px 22px rgba(65, 80, 130, 0.12);
}

.family-template-button.is-selected {
  border-color: rgba(122, 90, 245, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 241, 255, 0.96)),
    linear-gradient(135deg, rgba(122, 90, 245, 0.1), rgba(241, 199, 127, 0.08));
  box-shadow: 0 14px 28px rgba(84, 48, 142, 0.15);
}

body.guan-weixiang-template-active .family-template-button.is-private-reading-template {
  border-color: rgba(122, 90, 245, 0.76);
  background:
    linear-gradient(135deg, rgba(44, 27, 84, 0.96), rgba(103, 59, 166, 0.92));
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(84, 48, 142, 0.22);
}

.family-template-button span {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.family-template-button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

body.guan-weixiang-template-active .family-template-button.is-private-reading-template small {
  color: rgba(245, 236, 255, 0.82);
}

.generation-progress {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(214, 223, 238, 0.98);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
}

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

.generation-progress-text,
.generation-progress-percent {
  font-size: 13px;
  font-weight: 700;
}

.generation-progress-text {
  color: var(--ink);
}

.generation-progress-percent {
  color: var(--primary);
}

.generation-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e7edf8;
  overflow: hidden;
}

.generation-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3154d5 0%, #59aaf7 100%);
  transition: width 0.24s ease;
}

.inline-status {
  font-size: 14px;
}

.inline-status.ok {
  color: var(--success);
}

.inline-status.error {
  color: var(--danger);
}

.result-empty,
.result-summary-card,
.curve-panel {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
}

.result-empty {
  min-height: 112px;
  padding: 0;
  display: grid;
  align-content: start;
  gap: 0;
  border-color: rgba(162, 139, 239, 0.18);
  background:
    radial-gradient(circle at top right, rgba(146, 110, 248, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(251, 247, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.result-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.curve-template-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 18px;
}

.curve-template-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.curve-template-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #7652ca;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.curve-template-head strong {
  display: block;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.curve-template-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(162, 139, 239, 0.24);
  background: rgba(255, 255, 255, 0.82);
  color: #6f50c2;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.curve-template-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.curve-template-shell {
  position: relative;
  min-height: 240px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(162, 139, 239, 0.2);
  background:
    radial-gradient(circle at top right, rgba(146, 110, 248, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 244, 255, 0.98));
  overflow: hidden;
}

.curve-template-grid {
  position: absolute;
  inset: 18px 18px 18px 18px;
  display: grid;
  align-content: space-between;
}

.curve-template-grid span {
  display: block;
  width: 100%;
  border-top: 1px dashed rgba(118, 105, 181, 0.14);
}

.curve-template-bars {
  position: absolute;
  inset: 36px 36px 36px 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.curve-template-bars .bar {
  flex: 1;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, rgba(123, 103, 227, 0.32), rgba(89, 170, 247, 0.1));
  box-shadow: 0 10px 24px rgba(98, 82, 189, 0.12);
}

.curve-template-bars .bar-1 {
  height: 30%;
}

.curve-template-bars .bar-2 {
  height: 48%;
}

.curve-template-bars .bar-3 {
  height: 40%;
}

.curve-template-bars .bar-4 {
  height: 68%;
}

.curve-template-bars .bar-5 {
  height: 54%;
}

.curve-template-bars .bar-6 {
  height: 78%;
}

.curve-template-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
}

.curve-unlock-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(205, 216, 237, 0.92);
  background:
    radial-gradient(circle at top right, rgba(255, 214, 138, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(251, 246, 236, 0.98), rgba(255, 255, 255, 0.98));
}

.curve-unlock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.curve-unlock-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #8d6a2c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.curve-unlock-head strong {
  display: block;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.curve-unlock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(214, 182, 125, 0.52);
  background: rgba(255, 252, 245, 0.9);
  color: #8d6a2c;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.curve-unlock-copy {
  margin: 0;
  color: #5a657d;
  line-height: 1.7;
}

.curve-unlock-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.curve-unlock-button {
  justify-self: start;
  min-width: 180px;
}

.result-summary-card,
.curve-panel {
  padding: 18px;
}

.curve-panel {
  display: grid;
  gap: 14px;
}

.curve-panel-head,
.result-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.curve-panel-head h3,
.result-summary-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.result-summary-card {
  display: grid;
  gap: 14px;
}

.result-tier-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(134, 155, 205, 0.38);
  background: rgba(238, 244, 255, 0.92);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.curve-preview-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(205, 216, 237, 0.92);
  background:
    radial-gradient(circle at top right, rgba(136, 173, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(245, 249, 255, 0.98), rgba(255, 252, 247, 0.98));
}

.curve-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.curve-preview-kicker {
  color: #5f7190;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.curve-preview-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}

.curve-preview-value {
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.curve-preview-unit {
  color: #60708b;
  font-size: 15px;
  font-weight: 700;
}

.curve-preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(154, 173, 219, 0.48);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.curve-preview-copy {
  margin: 0;
  color: #4f607b;
  line-height: 1.7;
  font-size: 14px;
}

.curve-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.curve-preview-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
}

.basic-profile-preview {
  display: grid;
  gap: 16px;
}

.basic-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
  gap: 16px;
}

.basic-profile-main-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.basic-profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(196, 210, 237, 0.9);
  background:
    radial-gradient(circle at 88% 12%, rgba(73, 113, 222, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(248, 251, 255, 0.98), rgba(255, 250, 242, 0.98));
}

.basic-profile-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #3154d5;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.basic-profile-hero h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.basic-profile-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(154, 173, 219, 0.48);
  background: #ffffff;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.basic-profile-copy-action {
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(49, 84, 213, 0.12);
}

.basic-profile-copy-action:hover {
  border-color: rgba(49, 84, 213, 0.42);
  background: #eef4ff;
}

.basic-profile-copy-action:focus-visible {
  outline: 3px solid rgba(49, 84, 213, 0.22);
  outline-offset: 2px;
}

.basic-profile-use-index {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(196, 210, 237, 0.9);
  border-radius: 16px;
  background:
    radial-gradient(circle at 96% 8%, rgba(132, 107, 227, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
}

.basic-profile-use-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(218, 226, 241, 0.9);
  padding-bottom: 12px;
}

.basic-profile-use-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

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

.basic-profile-use-card {
  display: grid;
  gap: 7px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(220, 226, 239, 0.96);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.basic-profile-use-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.basic-profile-use-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

.basic-profile-use-hits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.basic-profile-use-hit {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid rgba(199, 210, 254, 0.86);
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.basic-profile-use-hit.tone-ziwei {
  border-color: #c4b5fd;
  background: #f3e8ff;
  color: #5b21b6;
}

.basic-profile-use-hit.tone-bazi {
  border-color: #93c5fd;
  background: #e0f2fe;
  color: #1d4ed8;
}

.basic-profile-use-hit.tone-vedic {
  border-color: #f5d36b;
  background: #fef3c7;
  color: #92400e;
}

.basic-profile-use-hit.tone-qimen {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.basic-profile-use-hit.tone-western {
  border-color: #fda4af;
  background: #ffe4e6;
  color: #9f1239;
}

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

.archetype-panel-shell {
  display: grid;
  gap: 18px;
}

.archetype-empty-card {
  display: grid;
  gap: 14px;
  min-height: 360px;
  align-content: center;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid rgba(196, 210, 237, 0.9);
  background:
    radial-gradient(circle at 88% 12%, rgba(107, 86, 220, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(248, 251, 255, 0.98), rgba(255, 250, 242, 0.98));
}

.archetype-empty-card strong {
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.archetype-empty-card p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.archetype-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(196, 210, 237, 0.9);
  background:
    radial-gradient(circle at 90% 10%, rgba(73, 113, 222, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(248, 251, 255, 0.98), rgba(255, 250, 242, 0.98));
}

.archetype-page-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.archetype-page-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.archetype-template-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(196, 210, 237, 0.9);
  background: rgba(255, 255, 255, 0.76);
}

.archetype-template-button {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #66758c;
  text-align: left;
}

.archetype-template-button strong {
  color: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.archetype-template-button span {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.78;
}

.archetype-template-button.active {
  border-color: rgba(49, 84, 213, 0.24);
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 225, 159, 0.18), transparent 30%),
    linear-gradient(135deg, #314fd0, #725adc);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(49, 84, 213, 0.18);
}

.archetype-template-button:not(.active):hover {
  border-color: rgba(154, 173, 219, 0.46);
  background: rgba(248, 251, 255, 0.92);
  color: var(--primary-strong);
}

.archetype-page-layout {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.archetype-page-layout .ziwei-archetype-column {
  position: static;
}

.archetype-detail-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(196, 210, 237, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
}

.archetype-detail-panel h4 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.18;
}

.archetype-template-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.archetype-detail-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.archetype-detail-panel dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(199, 210, 229, 0.9);
}

.archetype-detail-panel dl div:last-child {
  border-bottom: 0;
}

.archetype-detail-panel dt {
  color: #3154d5;
  font-size: 13px;
  font-weight: 900;
}

.archetype-detail-panel dd {
  min-width: 0;
  margin: 0;
  color: #253247;
  font-size: 15px;
  line-height: 1.65;
}

.ziwei-archetype-column {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.ziwei-archetype-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(210, 191, 142, 0.82);
  background:
    radial-gradient(circle at 50% 5%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(180deg, #fffdf7 0%, #f8f2e5 100%);
  box-shadow:
    0 18px 38px rgba(92, 74, 41, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: #20351d;
}

.ziwei-archetype-card.template-viral {
  gap: 14px;
}

.ziwei-archetype-card.template-viral .ziwei-archetype-visual {
  min-height: 520px;
}

.ziwei-archetype-card.template-viral .ziwei-archetype-title-block strong {
  font-size: clamp(3rem, 8vw, 5rem);
}

.ziwei-archetype-card.template-professional {
  background:
    radial-gradient(circle at 50% 5%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(180deg, #fffdf7 0%, #f3efe3 100%);
}

.ziwei-archetype-visual {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 430px;
  padding: 16px 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(218, 190, 122, 0.72);
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.92), transparent 32%),
    radial-gradient(circle at 18% 68%, rgba(214, 184, 103, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(239, 246, 229, 0.96), rgba(255, 249, 232, 0.98) 48%, rgba(231, 239, 219, 0.96));
  overflow: hidden;
}

.ziwei-archetype-visual.visual-image-backed {
  display: block;
  padding: 0;
  background: #fffdf8;
}

.ziwei-archetype-visual.visual-image-backed img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: top center;
}

.ziwei-archetype-spark {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  background: #d6a344;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0.9;
}

.ziwei-archetype-spark.spark-left {
  left: 22px;
  top: 26px;
}

.ziwei-archetype-spark.spark-right {
  right: 22px;
  top: 30px;
}

.ziwei-archetype-title-block {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.ziwei-archetype-title-block span {
  color: #172033;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ziwei-archetype-title-block strong {
  color: #263d20;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: 0;
  white-space: nowrap;
}

.ziwei-archetype-title-block em {
  color: #b7893e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.ziwei-archetype-scene {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 150px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 235px;
}

.ziwei-archetype-tags {
  display: grid;
  gap: 12px;
}

.ziwei-archetype-tags span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(192, 155, 82, 0.58);
  background: rgba(255, 255, 255, 0.86);
  color: #1f2f1d;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(80, 67, 37, 0.08);
}

.ziwei-archetype-tags.right span {
  justify-self: end;
}

.ziwei-archetype-tags b {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #263d20;
  color: #f6df9f;
  font-size: 13px;
  line-height: 1;
}

.ziwei-archetype-figure {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: end;
  min-height: 250px;
}

.ziwei-archetype-figure::before,
.ziwei-archetype-figure::after {
  content: "";
  position: absolute;
  bottom: 22px;
  width: 76px;
  height: 96px;
  border-radius: 14px;
  border: 2px solid rgba(177, 134, 54, 0.72);
  background: rgba(255, 252, 240, 0.9);
  transform: rotate(-12deg);
}

.ziwei-archetype-figure::before {
  left: -12px;
}

.ziwei-archetype-figure::after {
  right: -12px;
  transform: rotate(10deg);
}

.figure-head {
  position: absolute;
  top: 12px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 58%, #f6d7b4 0 46%, transparent 47%),
    radial-gradient(circle at 50% 40%, #2c251d 0 58%, transparent 59%);
  box-shadow: 0 8px 16px rgba(48, 38, 24, 0.16);
}

.figure-body {
  width: 132px;
  height: 178px;
  margin-bottom: 8px;
  border-radius: 58px 58px 24px 24px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 252, 240, 0.96) 18% 38%, #2c4a28 38% 62%, rgba(255, 252, 240, 0.96) 62% 82%, transparent 82%),
    linear-gradient(180deg, #395a30 0%, #203a20 100%);
  box-shadow: 0 18px 28px rgba(34, 55, 31, 0.16);
}

.figure-scroll {
  position: absolute;
  right: 18px;
  bottom: 38px;
  width: 70px;
  height: 94px;
  border-radius: 10px;
  border: 2px solid #b7893e;
  background:
    repeating-linear-gradient(180deg, rgba(79, 65, 39, 0.16) 0 2px, transparent 2px 13px),
    #fff7df;
  transform: rotate(8deg);
}

.ziwei-archetype-visual > p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #254721;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.ziwei-archetype-section {
  display: grid;
  gap: 9px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(226, 204, 157, 0.9);
  background: rgba(255, 255, 255, 0.84);
}

.ziwei-archetype-section-kicker {
  color: #254721;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ziwei-archetype-section h4 {
  margin: 0;
  color: #172033;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

.ziwei-archetype-core {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(201, 159, 80, 0.56);
  background: #fff8e4;
  color: #6b5225;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}

.ziwei-archetype-section p {
  margin: 0;
  color: #1f2937;
  font-size: 15px;
  line-height: 1.75;
}

.ziwei-archetype-section.compact {
  gap: 6px;
}

.ziwei-archetype-viral-copy h4 {
  font-size: 31px;
}

.ziwei-archetype-viral-copy p {
  color: #254721;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.ziwei-archetype-row {
  display: grid;
  grid-template-columns: 30px auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(196, 166, 104, 0.46);
}

.ziwei-archetype-row:last-child {
  border-bottom: 0;
}

.ziwei-archetype-row b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef2dc;
  color: #254721;
  font-size: 13px;
}

.ziwei-archetype-row span {
  color: #254721;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.ziwei-archetype-row p {
  min-width: 0;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.6;
}

.ziwei-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ziwei-badge-grid span {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(201, 159, 80, 0.42);
  background: #fff8e4;
  color: #5e4821;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.ziwei-badge-grid b {
  color: #254721;
  font-size: 15px;
  font-weight: 900;
}

.ziwei-archetype-phase {
  padding: 9px 12px;
  border-radius: 12px;
  background: #eef3e5;
  color: #254721;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.ziwei-archetype-quote {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(157, 171, 127, 0.78);
  background: #f7f8ed;
  color: #254721;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.ziwei-archetype-watermark {
  color: #a67b37;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: right;
}

.ziwei-archetype-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.ziwei-archetype-actions .primary-button,
.ziwei-archetype-actions .ghost-button {
  width: 100%;
  justify-content: center;
}

.qimen-preview {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(198, 216, 230, 0.92);
  background: linear-gradient(135deg, rgba(249, 252, 255, 0.98), rgba(244, 250, 246, 0.98));
}

.qimen-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.qimen-kicker {
  display: inline-flex;
  margin-bottom: 7px;
  color: #1f7465;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.qimen-preview h4 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
}

.qimen-preview p {
  margin: 8px 0 0;
  color: #52617a;
  font-size: 14px;
  line-height: 1.65;
}

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

.qimen-palace {
  --qimen-tone: #66758c;
  display: grid;
  gap: 7px;
  min-height: 132px;
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(216, 225, 237, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 3px 0 0 var(--qimen-tone);
}

.qimen-tone-opportunity,
.qimen-tone-growth,
.qimen-tone-support {
  --qimen-tone: #238767;
}

.qimen-tone-visibility {
  --qimen-tone: #b07a2e;
}

.qimen-tone-hidden {
  --qimen-tone: #5f79be;
}

.qimen-tone-friction,
.qimen-tone-constraint,
.qimen-tone-volatility {
  --qimen-tone: #c85959;
}

.qimen-palace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.qimen-palace-top strong {
  color: var(--qimen-tone);
  font-size: 14px;
  line-height: 1.2;
}

.qimen-palace-top span,
.qimen-palace-sub,
.qimen-palace-stems {
  color: #687994;
  font-size: 12px;
  font-weight: 750;
}

.qimen-palace-main {
  color: var(--ink);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.1;
}

.qimen-signal-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
}

.qimen-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(198, 72, 72, 0.5);
  color: #b73030;
  background: rgba(255, 248, 248, 0.95);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.qimen-signal-horse {
  border-color: rgba(198, 72, 72, 0.62);
  color: #d00000;
}

.qimen-palace-center .qimen-palace-main {
  font-size: 19px;
}

.qimen-palace-sub,
.qimen-palace-stems {
  overflow-wrap: anywhere;
}

.qimen-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qimen-meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(198, 216, 230, 0.92);
  color: #52617a;
  font-size: 12px;
  font-weight: 800;
}

.basic-profile-section {
  --profile-tone: #3154d5;
  --profile-bg: rgba(247, 250, 255, 0.98);
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(216, 225, 241, 0.96);
  background: linear-gradient(180deg, #ffffff, var(--profile-bg));
  box-shadow: inset 4px 0 0 var(--profile-tone);
}

.basic-profile-section.tone-blue {
  --profile-tone: #3154d5;
  --profile-bg: rgba(240, 246, 255, 0.98);
}

.basic-profile-section.tone-green {
  --profile-tone: #1b8f6a;
  --profile-bg: rgba(239, 250, 245, 0.98);
}

.basic-profile-section.tone-gold {
  --profile-tone: #b07a2e;
  --profile-bg: rgba(255, 248, 236, 0.98);
}

.basic-profile-section.tone-violet {
  --profile-tone: #7650b7;
  --profile-bg: rgba(247, 243, 255, 0.98);
}

.basic-profile-section.tone-red {
  --profile-tone: #c85959;
  --profile-bg: rgba(255, 244, 242, 0.98);
}

.basic-profile-section h4 {
  margin: 0;
  color: var(--profile-tone);
  font-size: 16px;
  line-height: 1.25;
}

.basic-profile-section dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.basic-profile-section dl div {
  display: grid;
  grid-template-columns: minmax(86px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.basic-profile-section dt {
  color: #6a7890;
  font-size: 12px;
  font-weight: 800;
}

.basic-profile-section dd {
  min-width: 0;
  margin: 0;
  color: #263149;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.basic-profile-section-note {
  grid-column: 1 / -1;
}

.basic-profile-section-note p {
  margin: 0;
  color: #4f607b;
  font-size: 14px;
  line-height: 1.7;
}

.basic-profile-skeleton {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(223, 231, 246, 0.8), rgba(244, 247, 253, 0.94), rgba(223, 231, 246, 0.8));
}

.basic-profile-skeleton.short {
  width: 68%;
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.payment-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.38);
  backdrop-filter: blur(8px);
}

.payment-sheet {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(214, 223, 238, 0.96);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.99));
  box-shadow: 0 28px 80px rgba(20, 33, 56, 0.22);
  display: grid;
  gap: 16px;
}

.payment-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.payment-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #617391;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-sheet-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.payment-close {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(214, 223, 238, 0.96);
  background: #ffffff;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.payment-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.payment-grid {
  display: grid;
  gap: 10px;
}

.payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(220, 227, 240, 0.98);
  background: #ffffff;
}

.payment-row span {
  color: #60708b;
}

.payment-row strong {
  color: var(--ink);
  font-size: 18px;
}

.payment-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.payment-feature {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(244, 247, 255, 0.92);
  border: 1px solid rgba(200, 212, 238, 0.92);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
}

.payment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pillar-grid,
.result-meta,
.curve-tabs,
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pillar-card {
  border-radius: 16px;
  border: 1px solid rgba(218, 226, 240, 0.96);
  background: #ffffff;
}

.pillar-card {
  --pillar-ink: var(--ink);
  --pillar-border: rgba(218, 226, 240, 0.96);
  --pillar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98));
  min-height: 118px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border-color: var(--pillar-border);
  background: var(--pillar-bg);
}

.pillar-label {
  color: #687994;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pillar-value {
  color: var(--pillar-ink);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.pillar-card .pillar-label {
  color: var(--pillar-ink);
  opacity: 0.78;
}

.pillar-card.theme-wood {
  --pillar-ink: #2f8f61;
  --pillar-border: rgba(121, 200, 154, 0.38);
  --pillar-bg: linear-gradient(180deg, rgba(238, 250, 243, 0.98), rgba(229, 247, 236, 0.98));
}

.pillar-card.theme-fire {
  --pillar-ink: #cf6b4c;
  --pillar-border: rgba(231, 170, 144, 0.4);
  --pillar-bg: linear-gradient(180deg, rgba(255, 244, 238, 0.98), rgba(255, 238, 228, 0.98));
}

.pillar-card.theme-earth {
  --pillar-ink: #b07a2e;
  --pillar-border: rgba(218, 186, 132, 0.42);
  --pillar-bg: linear-gradient(180deg, rgba(255, 248, 236, 0.98), rgba(255, 243, 219, 0.98));
}

.pillar-card.theme-metal {
  --pillar-ink: #8d6a2c;
  --pillar-border: rgba(217, 192, 135, 0.42);
  --pillar-bg: linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(250, 241, 221, 0.98));
}

.pillar-card.theme-water {
  --pillar-ink: #4a82d6;
  --pillar-border: rgba(148, 181, 234, 0.4);
  --pillar-bg: linear-gradient(180deg, rgba(240, 246, 255, 0.98), rgba(230, 239, 255, 0.98));
}

.meta-pill,
.chart-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.curve-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.chart-shell {
  position: relative;
  min-height: 340px;
  border-radius: 16px;
  border: 1px solid rgba(218, 226, 240, 0.96);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(247, 249, 253, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  padding: 12px 14px 14px;
  overflow: hidden;
}

.chart-shell.is-loading {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 253, 0.98));
}

.tv-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 10px;
}

.tv-chart-symbol,
.tv-chart-meta {
  color: #70809a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tv-chart-symbol {
  color: #3154d5;
}

.tv-chart-stage {
  position: relative;
  isolation: isolate;
}

.kline-chart {
  display: block;
  width: 100%;
  height: clamp(340px, 42vw, 440px);
}

.kline-grid-line {
  stroke: rgba(23, 32, 51, 0.08);
  stroke-width: 1;
}

.kline-axis-line {
  stroke: rgba(23, 32, 51, 0.14);
  stroke-width: 1;
}

.kline-axis-label,
.kline-bottom-label {
  fill: rgba(89, 106, 136, 0.88);
  font-size: 11px;
  font-family: var(--font-body);
}

.kline-candle.bull {
  fill: #089981;
}

.kline-candle.bear {
  fill: #f23645;
}

.kline-wick.bull,
.kline-wick.bear {
  stroke-width: 2;
}

.kline-wick.bull {
  stroke: #089981;
}

.kline-wick.bear {
  stroke: #f23645;
}

.kline-current-marker {
  stroke: rgba(49, 84, 213, 0.28);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.kline-hover-line {
  stroke: rgba(49, 84, 213, 0.38);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.kline-hover-line.is-visible {
  opacity: 1;
}

.kline-hover-band {
  fill: rgba(49, 84, 213, 0.06);
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.kline-hover-band.is-visible {
  opacity: 1;
}

.kline-candle-group.is-active .kline-candle,
.kline-candle-group.is-active .kline-wick {
  filter: brightness(1.08);
}

.kline-hover-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 248px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(20, 25, 40, 0.94);
  color: #ffffff;
  border: 1px solid rgba(155, 171, 214, 0.28);
  box-shadow: 0 18px 34px rgba(20, 33, 56, 0.28);
  pointer-events: none;
}

.kline-tooltip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.kline-tooltip-head strong {
  font-size: 14px;
  font-weight: 800;
}

.kline-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.kline-tooltip-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.kline-tooltip-delta {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.74);
}

.kline-tooltip-delta.bull {
  color: #7dffca;
}

.kline-tooltip-delta.bear {
  color: #ffc0cb;
}

.kline-tooltip-note {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.6;
}

.kline-tooltip-tone {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.kline-tooltip-tone.bull {
  background: rgba(8, 153, 129, 0.18);
  color: #7dffca;
}

.kline-tooltip-tone.bear {
  background: rgba(242, 54, 69, 0.18);
  color: #ffc0cb;
}

.decision-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.decision-badge.attack {
  background: rgba(8, 153, 129, 0.18);
  color: #7dffca;
}

.decision-badge.balance {
  background: rgba(49, 84, 213, 0.18);
  color: #b8cbff;
}

.decision-badge.observe {
  background: rgba(224, 174, 54, 0.2);
  color: #ffde8a;
}

.decision-badge.defense {
  background: rgba(242, 54, 69, 0.18);
  color: #ffc0cb;
}

.decision-badge.neutral {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.kline-callout {
  fill: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-body);
}

@media (max-width: 980px) {
  .workspace,
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .basic-profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .archetype-page-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ziwei-archetype-column {
    position: static;
  }

  .intake-showcase-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .intake-showcase-point-featured {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  }

  .pillar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-main,
  .topbar-actions,
  .panel-head,
  .result-head {
    display: grid;
    justify-content: stretch;
  }

  .topbar-actions {
    width: 100%;
    margin-left: 0;
  }

  .topbar-actions .member-session-summary {
    width: 100%;
    justify-items: start;
  }

  .topbar-actions .member-session-pill {
    max-width: 100%;
  }

  .page-topbar::before {
    inset: 20px 28px 28px 28px;
  }
}

@media (max-width: 640px) {
  .bazi-page {
    padding: 12px 10px 24px;
  }

  .workspace-tabs {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 18px;
  }

  .workspace-tab {
    min-height: 68px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .workspace-tab span {
    font-size: 17px;
  }

  .page-topbar,
  .panel {
    padding: 18px 16px;
    border-radius: 18px;
  }

  .hero-title,
  .panel-head h2,
  .intake-showcase-copy h3,
  .curve-panel-head h3,
  .result-summary-card h3 {
    font-size: 24px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .hero-note,
  .hero-status {
    font-size: 14px;
  }

  .ghost-button,
  .primary-button {
    width: 100%;
  }

  .family-template-head {
    align-items: flex-start;
    display: grid;
  }

  .family-template-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .pillar-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .curve-preview-head {
    display: grid;
  }

  .curve-preview-cta {
    width: 100%;
    justify-content: center;
  }

  .basic-profile-hero {
    display: grid;
  }

  .archetype-page-head {
    display: grid;
  }

  .archetype-template-switch {
    grid-template-columns: minmax(0, 1fr);
  }

  .archetype-empty-card {
    min-height: 300px;
    padding: 20px;
  }

  .archetype-detail-panel dl div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .ziwei-archetype-card {
    padding: 10px;
  }

  .ziwei-badge-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ziwei-archetype-visual {
    min-height: 380px;
  }

  .ziwei-archetype-title-block strong {
    font-size: clamp(2.35rem, 13vw, 3.25rem);
  }

  .ziwei-archetype-title-block em {
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  .ziwei-archetype-scene {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .ziwei-archetype-tags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ziwei-archetype-tags.right span,
  .ziwei-archetype-tags span {
    justify-self: stretch;
  }

  .ziwei-archetype-figure {
    order: -1;
    min-height: 190px;
  }

  .ziwei-archetype-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .ziwei-archetype-row span {
    white-space: normal;
  }

  .ziwei-archetype-row p {
    grid-column: 2;
  }

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

  .basic-profile-use-head {
    display: grid;
    justify-content: stretch;
  }

  .basic-profile-use-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .qimen-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .qimen-preview-head {
    display: grid;
  }

  .basic-profile-section dl div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .intake-showcase-shell {
    padding: 18px;
    border-radius: 22px;
  }

  .intake-showcase-actions {
    display: grid;
  }

  .intake-showcase-image-hint {
    right: 20px;
    bottom: 20px;
  }
}

@media (max-width: 640px) {
  .intake-showcase-point-featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .intake-showcase-image-hint {
    right: 18px;
    bottom: 18px;
  }
}
