* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 0%, rgba(145, 134, 255, 0.18), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(180, 168, 232, 0.18), transparent 26%),
    linear-gradient(120deg, rgba(66, 197, 166, 0.06), transparent 30%),
    var(--bg-base);
  color: var(--ink);
  font-family: var(--font-ui);
  letter-spacing: 0;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

img,
svg,
canvas {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(234, 218, 180, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(rgba(234, 218, 180, 0.028) 1px, transparent 1px) 0 0 / 56px 56px;
  content: "";
}

:root[data-theme="light"] {
  background:
    radial-gradient(circle at 16% 0%, rgba(98, 87, 235, 0.14), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(152, 215, 255, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), transparent 42%),
    var(--bg-base);
}

:root[data-theme="light"] body::before {
  background:
    linear-gradient(90deg, rgba(86, 78, 154, 0.045) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(rgba(86, 78, 154, 0.04) 1px, transparent 1px) 0 0 / 56px 56px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

input,
select {
  min-width: 0;
}

.app-shell {
  min-height: 100vh;
  padding: 18px 18px 96px;
}

main,
.screen,
.screen > div,
.chart-grid > *,
.home-dashboard > *,
.two-col > *,
.dream-layout > *,
.compare-layout > * {
  min-width: 0;
}

.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 420ms ease,
    transform 520ms cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(220px, 0.8fr) minmax(360px, 1fr) auto;
  gap: 12px;
  align-items: center;
  max-width: 1480px;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px;
  background: rgba(9, 10, 15, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}

:root[data-theme="light"] .topbar {
  border-color: rgba(71, 62, 132, 0.12);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 44px rgba(58, 48, 119, 0.12);
}

.brand-button,
.profile-chip,
.nav-item,
.icon-button,
.ghost-action,
.primary-action,
.discovery-strip button,
.saved-strip button,
.intent-grid button,
.zodiac-pill,
.mbti-type,
.dream-category,
.dream-result,
.luck-node,
.mini-token,
.shensha-item,
.ten-item,
.compare-person {
  border: 0;
  color: inherit;
  text-align: left;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  background: transparent;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 28px rgba(145, 134, 255, 0.14);
}

.brand-button strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1;
}

.brand-button small {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 12px;
  white-space: nowrap;
}

.global-search {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.05);
}

.global-search span {
  color: var(--gold);
  font-weight: 900;
}

.global-search input {
  width: 100%;
  border: 0;
  color: var(--ink);
  background: transparent;
  outline: none;
}

.global-search input::placeholder {
  color: var(--ink-muted);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
}

.search-results button {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.search-results button span {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.search-results button b,
.search-results button small {
  display: block;
}

.search-results button small {
  margin-top: 4px;
  color: var(--ink-muted);
  line-height: 1.45;
}

.search-results button em {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin-top: 8px;
  border: 1px solid rgba(145, 134, 255, 0.28);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--gold);
  background: rgba(145, 134, 255, 0.08);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.search-results button:hover {
  background: var(--gold-soft);
}

.search-focus-flash {
  animation: search-focus-flash 1.15s ease both;
}

@keyframes search-focus-flash {
  0%,
  100% {
    box-shadow: var(--shadow-soft);
  }

  35% {
    border-color: rgba(145, 134, 255, 0.62);
    box-shadow:
      0 0 0 4px rgba(145, 134, 255, 0.12),
      var(--shadow-strong);
  }
}

.top-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.045);
  overflow-x: auto;
}

.nav-item {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 13px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.nav-item.active,
.bottom-nav button.active {
  color: var(--ink-deep);
  background: linear-gradient(135deg, var(--gold), var(--mist));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 12px 34px rgba(104, 95, 255, 0.2);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: end;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  text-align: center;
  transition: var(--transition-fast);
}

.theme-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}

.theme-icon::before,
.theme-icon::after {
  position: absolute;
  content: "";
}

.theme-icon::before {
  inset: 5px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 -8px 0 -4px currentColor,
    0 8px 0 -4px currentColor,
    8px 0 0 -4px currentColor,
    -8px 0 0 -4px currentColor,
    6px 6px 0 -4px currentColor,
    -6px 6px 0 -4px currentColor,
    6px -6px 0 -4px currentColor,
    -6px -6px 0 -4px currentColor;
}

.theme-icon::after {
  display: none;
}

:root[data-theme="dark"] .theme-icon::before {
  inset: 2px;
  background: transparent;
  box-shadow: inset -6px -3px 0 0 currentColor;
}

.icon-button:hover,
.ghost-action:hover,
.primary-action:hover,
.profile-chip:hover {
  transform: translateY(-1px);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  background: rgba(255, 255, 255, 0.055);
}

.profile-chip span {
  display: inline-grid;
  width: auto;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  place-items: center;
  border-radius: 999px;
  color: var(--ink-deep);
  background: linear-gradient(135deg, var(--gold), var(--mist));
  box-shadow: 0 0 18px rgba(104, 95, 255, 0.24);
  font-weight: 900;
}

.profile-chip b {
  max-width: 88px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  max-width: 1480px;
  margin: 0 auto;
}

.screen {
  display: none;
  animation: screenIn var(--transition-mid);
}

.screen.active {
  display: block;
}

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

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  min-height: calc(100vh - 126px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(20px, 3vw, 36px);
  padding: clamp(24px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(145, 134, 255, 0.14), transparent 42%),
    linear-gradient(225deg, rgba(66, 197, 166, 0.12), transparent 34%),
    rgba(12, 13, 20, 0.78);
  box-shadow: var(--shadow-strong);
}

:root[data-theme="light"] .home-hero {
  background:
    radial-gradient(circle at 88% 8%, rgba(155, 148, 255, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 242, 255, 0.86));
}

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

.hero-copy,
.birth-card {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 78px);
  font-weight: 900;
  line-height: 1;
}

.hero-subtitle {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.4vw, 30px);
  line-height: 1.15;
}

.hero-one-line {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.8;
}

.birth-card,
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.birth-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.add-person-form {
  display: grid;
  gap: 14px;
}

.section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-header.compact {
  margin-bottom: 10px;
}

.section-header span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-header h2 {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.14;
}

.section-header b {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--gold);
  background: var(--gold-soft);
  font-size: 12px;
}

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

.field label,
.label-like {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.dream-search input {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
  transition: var(--transition-fast);
  -webkit-text-size-adjust: 100%;
}

.privacy-note {
  margin: -2px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.65;
}

.field input:focus,
.field select:focus,
.dream-search input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

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

.form-grid > .field:nth-child(-n + 3) {
  grid-column: span 2;
}

.form-grid > .field:nth-child(n + 4) {
  grid-column: span 3;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.segmented button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: var(--ink-muted);
  background: transparent;
  font-weight: 800;
}

.segmented button.active {
  color: var(--ink-deep);
  background: var(--gold);
}

.collapsible {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0;
  background: rgba(255, 255, 255, 0.045);
}

.collapsible summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

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

.collapsible summary small {
  color: var(--ink-muted);
  font-size: 11px;
}

.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 13px;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 900;
  transition: var(--transition-fast);
}

.primary-action {
  color: var(--ink-deep);
  background: linear-gradient(135deg, var(--gold), var(--mist));
  box-shadow: 0 14px 34px rgba(145, 134, 255, 0.18);
}

.ghost-action {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.below-hero,
.returning-home,
.screen-head,
.chart-grid,
.two-col,
.dream-layout,
.compare-layout {
  margin-top: 22px;
}

.below-hero p {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 14px;
}

.discovery-strip,
.intent-grid,
.saved-strip,
.zodiac-switcher,
.dream-categories,
.mini-token-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.discovery-strip button,
.intent-grid button,
.saved-strip button {
  flex: 1 1 220px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-card);
  transition: var(--transition-fast);
}

.discovery-strip button:hover,
.intent-grid button:hover,
.saved-strip button:hover,
.dream-result:hover,
.zodiac-pill:hover,
.mbti-type:hover,
.luck-node:hover,
.shensha-item:hover,
.ten-item:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.discovery-strip span,
.intent-grid span {
  display: block;
  font-size: 24px;
}

.discovery-strip strong,
.intent-grid strong,
.saved-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.discovery-strip small,
.intent-grid small,
.saved-strip small {
  display: block;
  margin-top: 8px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.saved-profile-grid {
  display: grid;
  gap: 10px;
}

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

.profile-overview > span,
.profile-identity-grid b {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.profile-overview p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

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

.profile-identity-grid section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-identity-grid b,
.profile-identity-grid strong {
  display: block;
}

.profile-identity-grid strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.profile-summary-line {
  border-left: 2px solid var(--gold);
  padding-left: 12px;
}

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

.profile-chart-history,
.profile-mbti-history {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.profile-chart-history > div,
.profile-mbti-history > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-chart-history > div span,
.profile-chart-history > div b,
.profile-mbti-history > div span,
.profile-mbti-history > div b {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.profile-history-main,
.profile-mbti-history button {
  display: grid;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.profile-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.profile-history-delete {
  min-width: 64px;
  border: 1px solid rgba(216, 108, 93, 0.32);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--ink-muted);
  background: rgba(216, 108, 93, 0.08);
  font-size: 12px;
  font-weight: 900;
  transition: var(--transition-fast);
}

.profile-history-delete:hover {
  border-color: rgba(216, 108, 93, 0.48);
  color: var(--ink);
  background: var(--fire-soft);
}

.profile-mbti-history button {
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
}

.profile-history-main strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.18;
}

.profile-history-main p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.58;
}

.profile-history-main small {
  color: var(--ink-muted);
  line-height: 1.45;
}

.profile-mbti-history button strong {
  grid-row: 1 / span 2;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 24px;
}

.profile-mbti-history button span,
.profile-mbti-history button small {
  min-width: 0;
}

.profile-mbti-history button small {
  color: var(--ink-muted);
  line-height: 1.45;
}

.saved-profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.saved-profile-card.active {
  border-color: rgba(145, 134, 255, 0.42);
  background: var(--gold-soft);
}

.saved-profile-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.saved-profile-card strong,
.saved-profile-card small {
  display: block;
}

.saved-profile-card strong {
  margin-top: 4px;
}

.saved-profile-card small {
  margin-top: 5px;
  color: var(--ink-muted);
  line-height: 1.45;
}

.saved-profile-card p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.saved-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: end;
}

.saved-profile-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 900;
}

.saved-profile-actions button:not(:disabled):hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.saved-profile-actions .danger-action {
  color: var(--ink-muted);
}

.saved-profile-actions .danger-action:not(:disabled):hover {
  border-color: rgba(216, 108, 93, 0.44);
  background: var(--fire-soft);
  color: var(--ink);
}

.profile-pair-workbench {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.profile-pair-workbench.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-pair-workbench.empty > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-pair-workbench.empty span,
.profile-pair-workbench.empty b {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.profile-pair-workbench.empty p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

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

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

.profile-pair-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 900;
  transition: var(--transition-fast);
}

.profile-pair-actions button:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(320px, 0.76fr);
  gap: 18px;
}

.returning-home {
  display: grid;
  gap: 18px;
}

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

.returning-actions .ghost-action {
  min-height: 40px;
}

.card {
  padding: 20px;
}

.daily-lines {
  display: grid;
  gap: 10px;
}

.daily-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  text-align: left;
}

.daily-line-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--gold-soft);
  font-size: 20px;
  line-height: 1;
}

.daily-line b {
  display: block;
  margin: 1px 0 5px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.daily-line p,
.identity-card p,
.screen-head p,
.empty-state p,
.human-summary-card p,
.pillar p,
.element-card p,
.luck-detail p,
.flow-card p,
.shensha-item p,
.bone-card p,
.ten-item p,
.zodiac-card-copy,
.mbti-copy,
.dream-detail p,
.compare-result p,
.share-card p,
.reading-copy {
  color: var(--ink-soft);
  line-height: 1.72;
}

.daily-line p {
  margin: 0;
  max-width: 100%;
  text-align: left;
}

.identity-signature {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.18;
}

.element-mini-bars {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

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

.identity-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  transition: var(--transition-fast);
}

.identity-actions button:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.element-mini-row,
.element-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
}

.element-mini-row i,
.element-row i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.element-mini-row i > b,
.element-row i > b {
  display: block;
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: var(--color);
}

.screen-head {
  display: grid;
  max-width: 900px;
}

.screen-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
}

.empty-state {
  display: grid;
  gap: 10px;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--bg-card);
}

.empty-state h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 32px;
}

.human-summary-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 42px);
  background:
    radial-gradient(circle at 92% 18%, rgba(145, 134, 255, 0.2), transparent 26%),
    linear-gradient(135deg, rgba(23, 24, 35, 0.96), rgba(29, 34, 49, 0.9));
  box-shadow: var(--shadow-strong);
}

:root[data-theme="light"] .human-summary-card {
  background:
    radial-gradient(circle at 92% 18%, rgba(155, 148, 255, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 245, 255, 0.92));
}

.summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 18px;
}

.summary-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.human-summary-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1.04;
}

.human-summary-card.result-flash {
  animation: result-flash 1.1s ease both;
}

@keyframes result-flash {
  0%,
  100% {
    box-shadow: var(--shadow-strong);
  }

  38% {
    border-color: rgba(145, 134, 255, 0.68);
    box-shadow:
      0 0 0 4px rgba(145, 134, 255, 0.12),
      var(--shadow-strong);
  }
}

.summary-side {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.summary-side span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.summary-side strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 32px;
}

.summary-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.summary-details summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.summary-details summary:focus {
  outline: none;
}

.summary-details summary:focus-visible {
  border-radius: var(--radius-sm);
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

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

.summary-details summary span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.summary-details summary small {
  grid-column: 1;
  color: var(--ink-muted);
  line-height: 1.45;
}

.summary-details summary::after {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--gold);
  content: "+";
  font-size: 18px;
  font-weight: 800;
  transition: var(--transition-mid);
}

.summary-details[open] summary::after {
  transform: rotate(45deg);
}

.summary-detail-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
}

.summary-detail-panel section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.summary-detail-panel section span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.summary-detail-panel section p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.mini-token,
.keyword-cloud button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
  font-weight: 900;
}

.keyword-cloud button {
  transition: var(--transition-fast);
}

.keyword-cloud button:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.chart-grid[data-current-section="professional"] {
  display: flex;
  flex-direction: column;
}

.chart-grid[data-current-section="professional"] > [data-chart-section="professional"] {
  grid-column: 1 / -1;
  width: 100%;
}

.chart-grid[data-current-section="professional"] .chart-card {
  order: 1;
}

.chart-grid[data-current-section="professional"] .element-card {
  order: 2;
}

.chart-grid[data-current-section="professional"] .ten-card {
  order: 3;
}

.chart-grid[data-current-section="professional"] .shensha-card {
  order: 4;
}

.chart-detail-gate {
  display: block;
  margin-top: 10px;
  border: 1px solid rgba(145, 134, 255, 0.24);
  border-radius: var(--radius-lg);
  padding: 8px;
  background:
    linear-gradient(135deg, var(--gold-soft), transparent 72%),
    rgba(255, 255, 255, 0.04);
}

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

.chart-section-tab {
  display: grid;
  gap: 8px;
  min-height: 96px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--ink-muted);
  background:
    linear-gradient(135deg, rgba(102, 88, 232, 0.08), transparent 72%),
    rgba(255, 255, 255, 0.045);
  text-align: left;
  transition: var(--transition-fast);
}

.chart-section-tab b {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.chart-section-tab span {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}

.chart-section-tab em {
  justify-self: start;
  border: 1px solid rgba(145, 134, 255, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.chart-section-tab:hover,
.chart-section-tab.active {
  border-color: rgba(145, 134, 255, 0.24);
  background: linear-gradient(135deg, rgba(102, 88, 232, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: 0 14px 28px rgba(72, 56, 160, 0.08);
}

.chart-section-tab.active b,
.chart-section-tab.active span,
.chart-section-tab.active em {
  color: var(--accent);
}

.chart-overview-panel {
  margin-top: 14px;
}

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

.chart-overview-card,
.chart-relation-actions button {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(102, 88, 232, 0.1), transparent 70%),
    rgba(255, 255, 255, 0.045);
  text-align: left;
  transition: var(--transition-fast);
}

.chart-overview-card:hover,
.chart-relation-actions button:hover {
  border-color: rgba(145, 134, 255, 0.34);
  transform: translateY(-1px);
}

.chart-overview-card span,
.relation-reading span,
.relation-reading-side span,
.chart-relation-actions span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.chart-overview-card strong,
.chart-relation-actions strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.1;
}

.chart-overview-card p,
.relation-reading p,
.chart-relation-actions p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.62;
}

.relation-reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 14px;
  align-items: stretch;
}

.relation-reading h3 {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.relation-reading-side {
  border: 1px solid rgba(145, 134, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.relation-reading-side strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 34px;
}

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

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

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

.pillar {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pillar:hover {
  border-color: rgba(145, 134, 255, 0.44);
  background: rgba(255, 255, 255, 0.07);
}

.pillar::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--pillar-color);
  content: "";
}

.pillar-head {
  display: grid;
  gap: 4px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.pillar-head b {
  color: var(--gold);
  font-size: 13px;
}

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

.glyph {
  display: grid;
  min-height: 64px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.glyph strong {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 44px);
  line-height: 0.9;
}

.glyph span {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 12px;
}

.pillar-human {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.pillar-human strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.pillar-human p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.pillar-meta {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.pillar-meta .mini-token {
  min-height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

.element-bars {
  display: grid;
  gap: 13px;
  margin-top: 14px;
}

.element-donut {
  display: grid;
  width: min(230px, 64vw);
  aspect-ratio: 1;
  place-items: center;
  margin: 18px auto 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.04);
}

.element-donut > div {
  display: grid;
  width: 54%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card-strong);
  text-align: center;
}

.element-donut strong {
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 0.9;
}

.element-donut span,
.element-donut small {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

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

.element-role-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.element-role-grid span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.element-role-grid strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 28px;
}

.element-role-grid p {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
}

.element-row {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(127, 120, 150, 0.16);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.element-mini-row span {
  font-weight: 900;
}

.element-name {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(127, 120, 150, 0.12);
  font-size: 21px;
  font-weight: 900;
}

.element-meter {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.element-meter i {
  height: 10px;
}

.element-meter p {
  display: flex;
  margin: 0;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.4;
}

.element-meter strong {
  color: var(--ink);
  font-weight: 900;
}

.element-meter em {
  color: var(--ink-muted);
  font-style: normal;
}

.luck-timeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.luck-node {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
  transition: var(--transition-fast);
}

.luck-node.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.luck-node strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
}

.luck-node span,
.luck-node small {
  display: block;
  margin-top: 8px;
  color: var(--ink-muted);
}

.luck-node i,
.luck-progress-card i {
  display: block;
  overflow: hidden;
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.luck-node i b,
.luck-progress-card i b {
  display: block;
  width: var(--luck-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--mist));
}

.luck-detail {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.luck-stage-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 14px;
  align-items: stretch;
}

.luck-stage-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.12;
}

.luck-stage-card p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.66;
}

.luck-progress-card {
  display: grid;
  align-content: center;
  border: 1px solid rgba(145, 134, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  background:
    linear-gradient(135deg, var(--gold-soft), transparent 70%),
    rgba(255, 255, 255, 0.045);
}

.luck-progress-card span,
.luck-advice-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.luck-progress-card strong {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 40px;
}

.luck-progress-card small {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

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

.luck-advice-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.luck-advice-grid p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.luck-solar-action {
  margin-top: 12px;
}

.flow-overview,
.flow-action-list {
  display: grid;
  gap: 10px;
}

.flow-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.flow-tab {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 8px;
  color: var(--ink-muted);
  background: transparent;
  text-align: left;
  transition: var(--transition-fast);
}

.flow-tab b {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1;
}

.flow-tab span {
  font-size: 11px;
  font-weight: 800;
}

.flow-tab:hover,
.flow-tab.active {
  border-color: rgba(145, 134, 255, 0.42);
  color: var(--ink);
  background: var(--gold-soft);
}

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

.flow-overview section,
.flow-action-list p,
.flow-drill-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.flow-overview span,
.flow-action-list b,
.flow-drill-summary span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.flow-overview strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 24px;
}

.flow-overview p,
.flow-action-list p,
.flow-drill-summary p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.flow-action-list {
  margin-top: 10px;
}

.flow-action-list p {
  margin: 0;
}

.flow-action-list b {
  display: inline-block;
  min-width: 38px;
}

.flow-calendar,
.hour-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.flow-calendar {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.hour-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flow-day,
.hour-chip {
  display: grid;
  gap: 5px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
  transition: var(--transition-fast);
}

.flow-day:hover,
.hour-chip:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.flow-day.good {
  border-color: rgba(145, 134, 255, 0.22);
}

.flow-day.watch {
  border-color: rgba(142, 162, 189, 0.24);
}

.flow-day.active,
.hour-chip.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.flow-day span,
.hour-chip span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 900;
}

.flow-day b,
.hour-chip b {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1;
}

.flow-day small,
.hour-chip small {
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.35;
}

.shensha-list,
.shensha-suite,
.shensha-section-grid,
.shensha-reference-grid,
.ten-grid,
.score-grid,
.mbti-domain-grid,
.bone-breakdown,
.flow-list {
  display: grid;
  gap: 10px;
}

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

.shensha-hero {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(145, 134, 255, 0.24);
  border-radius: var(--radius-md);
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(145, 134, 255, 0.16), transparent 62%),
    rgba(255, 255, 255, 0.045);
}

.shensha-hero span,
.shensha-section-head span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.shensha-hero strong {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.1;
}

.shensha-hero p,
.shensha-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.shensha-filter-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.shensha-filter {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 9px;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.04);
  transition: var(--transition-fast);
}

.shensha-filter b {
  color: var(--ink);
  font-size: 12px;
}

.shensha-filter span {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  color: var(--bg-base);
  background: var(--ink-muted);
  font-size: 11px;
  font-weight: 900;
}

.shensha-filter:hover,
.shensha-filter.active {
  border-color: rgba(145, 134, 255, 0.42);
  background: var(--gold-soft);
}

.shensha-filter.active span {
  background: var(--gold);
}

.shensha-suite {
  gap: 14px;
}

.shensha-full-table {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(145, 134, 255, 0.1), transparent 66%),
    rgba(255, 255, 255, 0.04);
}

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

.shensha-full-grid section {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 112px;
  border: 1px solid rgba(138, 128, 113, 0.18);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.shensha-full-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.shensha-full-grid div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shensha-full-grid b,
.shensha-full-grid em {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

.shensha-full-grid em {
  color: var(--ink-muted);
  background: transparent;
}

.shensha-section {
  display: grid;
  gap: 10px;
}

.shensha-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.shensha-section-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
}

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

.shensha-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.shensha-reference {
  margin-top: 12px;
}

.shensha-reference-grid {
  margin-top: 10px;
}

.shensha-item,
.ten-item,
.score-card,
.bone-piece,
.bone-insight-grid section,
.flow-item,
.compare-person {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.shensha-item .mini-token-row {
  margin: 8px 0 0;
}

.shensha-item .mini-token {
  font-size: 11px;
}

.ten-item strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 12px;
}

.bone-human-summary {
  padding: 22px;
}

.bone-human-summary h3 {
  font-size: clamp(30px, 4vw, 50px);
}

.bone-human-summary .summary-copy {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.55;
}

.bone-scale {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

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

.bone-weight-chip {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 112px;
  max-width: 132px;
  min-height: 70px;
  border: 1px solid rgba(102, 88, 232, 0.22);
  border-radius: 24px;
  padding: 12px 14px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(102, 88, 232, 0.12), rgba(255, 255, 255, 0.04)),
    var(--bg-card-strong);
  box-shadow: 0 14px 28px rgba(72, 56, 160, 0.08);
  text-align: left;
}

.bone-weight-chip strong {
  display: block;
  color: var(--ink);
  white-space: nowrap;
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1;
}

.bone-scale .bone-weight-chip span {
  margin-top: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.bone-scale-head p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.bone-scale i {
  position: relative;
  display: block;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bone-scale i b {
  display: block;
  width: var(--bone-rank);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--water), var(--mist), var(--gold));
}

.bone-scale i em {
  position: absolute;
  top: 50%;
  left: var(--bone-rank);
  width: 18px;
  height: 18px;
  border: 2px solid var(--bg-base);
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 8px 22px rgba(145, 134, 255, 0.28);
  transform: translate(-50%, -50%);
}

.bone-scale span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

.bone-scale-labels {
  display: flex;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

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

.bone-insight-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.bone-insight-grid p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.bone-summary,
.bone-advice p {
  border: 1px solid rgba(145, 134, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 12px;
  background:
    linear-gradient(135deg, var(--gold-soft), transparent 70%),
    rgba(255, 255, 255, 0.045);
}

.bone-summary span,
.bone-advice b {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.bone-summary p,
.bone-advice p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.62;
}

.bone-summary p {
  font-family: var(--font-serif);
  font-size: 20px;
}

.bone-advice {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.bone-advice p {
  margin: 0;
}

.bone-advice b {
  display: inline-block;
  min-width: 66px;
}

.bone-piece {
  display: grid;
  gap: 7px;
}

.bone-piece i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bone-piece i em {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mist), var(--gold));
}

.bone-piece small {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.shensha-item.good {
  border-color: rgba(145, 134, 255, 0.28);
}

.shensha-item.watch {
  border-color: rgba(142, 162, 189, 0.34);
}

.shensha-item.inactive {
  opacity: 0.68;
}

.shensha-item em,
.ten-item em,
.score-card span,
.bone-piece span,
.flow-item span {
  color: var(--ink-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.ten-grid,
.ten-section,
.ten-section-grid {
  display: grid;
  gap: 12px;
}

.ten-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.26fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid rgba(145, 134, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px;
  background:
    radial-gradient(circle at 90% 16%, rgba(145, 134, 255, 0.18), transparent 26%),
    rgba(255, 255, 255, 0.045);
}

.ten-hero span,
.ten-section-head span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.ten-hero h3,
.ten-section-head h3 {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.12;
}

.ten-hero p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.68;
}

.ten-hero aside {
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.ten-hero aside strong {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1;
}

.ten-hero aside small {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.ten-section-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ten-section.muted .ten-item {
  opacity: 0.72;
}

.ten-empty {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--ink-soft);
}

.ten-item {
  min-height: 172px;
}

.ten-item.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.ten-item.inactive {
  border-style: dashed;
}

.pro-panel {
  margin-top: 18px;
}

.table-scroll {
  overflow-x: auto;
}

.pro-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
}

.pro-table th,
.pro-table td {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: center;
}

.pro-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-elevated);
  color: var(--gold);
}

.pro-table th:first-child,
.pro-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-elevated);
  color: var(--gold);
  font-weight: 900;
}

.pro-table td:first-child span,
.pro-table td:first-child small {
  display: inline-block;
  vertical-align: middle;
}

.pro-table td:first-child small {
  margin-left: 6px;
  color: var(--ink-muted);
  font-size: 10px;
}

.pro-suite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.pro-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.pro-suite h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
}

.pro-flow-head select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

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

.pro-mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.pro-mini-card.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.pro-mini-card span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

.pro-mini-card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1;
}

.pro-mini-card p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.two-col,
.dream-layout,
.compare-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.zodiac-switcher {
  margin-top: 18px;
}

.zodiac-human-summary {
  margin-top: 18px;
}

.zodiac-human-summary .summary-side strong {
  font-size: 24px;
  letter-spacing: 0;
}

.zodiac-core-card {
  color: var(--ink);
  text-align: left;
  transition: var(--transition-fast);
}

.zodiac-core-card:hover {
  transform: translateY(-2px);
  border-color: rgba(145, 134, 255, 0.42);
  background: var(--gold-soft);
}

.zodiac-pill,
.dream-category {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--bg-card);
  color: var(--ink);
  font-weight: 900;
  transition: var(--transition-fast);
}

.dream-category {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dream-category span {
  font-size: 16px;
}

.dream-category small {
  color: var(--ink-muted);
  font-size: 11px;
}

.dream-category em {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  color: var(--bg-base);
  background: var(--ink-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.dream-category.active em {
  background: var(--ink-deep);
}

.zodiac-pill.active,
.dream-category.active {
  color: var(--ink-deep);
  background: var(--gold);
}

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

.zodiac-profile-strip,
.zodiac-tips-list,
.zodiac-relation-grid {
  display: grid;
  gap: 10px;
}

.zodiac-profile-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.zodiac-profile-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 10px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.zodiac-tips-list,
.zodiac-relation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-action {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
  white-space: nowrap;
}

.zodiac-guide-lead {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.18;
}

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

.zodiac-guide-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.zodiac-guide-grid span,
.zodiac-action-strip span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.zodiac-guide-grid p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.zodiac-action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.zodiac-action-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.035);
}

.zodiac-period-block,
.zodiac-relation-grid {
  margin-top: 14px;
}

.zodiac-period-block,
.zodiac-relation-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

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

.zodiac-period-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.zodiac-period-tab.active {
  color: var(--ink-deep);
  border-color: transparent;
  background: var(--gold);
}

.zodiac-period-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.zodiac-period-panel span,
.zodiac-relation-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.zodiac-relation-grid strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 24px;
}

.zodiac-period-panel p,
.zodiac-relation-grid p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.zodiac-pair-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}

.zodiac-pair-form .primary-action {
  min-height: 44px;
  padding: 0 18px;
  white-space: nowrap;
}

.zodiac-pair-result,
.zodiac-pair-dimensions,
.zodiac-pair-advice,
.zodiac-table-section,
.zodiac-table-grid {
  display: grid;
  gap: 10px;
}

.zodiac-pair-result,
.zodiac-table-section {
  margin-top: 14px;
}

.zodiac-pair-summary,
.zodiac-pair-dimensions section,
.zodiac-pair-advice section,
.zodiac-relation-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.zodiac-pair-summary span,
.zodiac-pair-dimensions span,
.zodiac-pair-advice span,
.zodiac-relation-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.zodiac-pair-summary strong,
.zodiac-pair-dimensions strong,
.zodiac-relation-card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 24px;
}

.zodiac-pair-summary p,
.zodiac-pair-dimensions p,
.zodiac-pair-advice p,
.zodiac-relation-card p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

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

.zodiac-pair-dimensions b {
  float: right;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 28px;
}

.zodiac-pair-advice {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.zodiac-table-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.zodiac-relation-card {
  position: relative;
  min-height: 158px;
  text-align: left;
  transition: var(--transition-fast);
}

.zodiac-relation-card:hover {
  transform: translateY(-2px);
  border-color: rgba(145, 134, 255, 0.42);
  background: var(--gold-soft);
}

.zodiac-relation-card b {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 26px;
}

.stars {
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 0;
}

.astro-wheel {
  position: relative;
  overflow: hidden;
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin: 14px auto 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.08) 0 0.5deg, transparent 0.5deg 30deg),
    radial-gradient(circle, transparent 0 23%, var(--line) 23.2% 23.8%, transparent 24% 48%, var(--line) 48.2% 48.8%, transparent 49%),
    conic-gradient(from 0deg, rgba(145, 134, 255, 0.14), rgba(180, 168, 232, 0.14), rgba(66, 197, 166, 0.12), rgba(145, 134, 255, 0.14));
}

.aspect-line {
  position: absolute;
  z-index: 1;
  height: 14px;
  border: 0;
  padding: 0;
  transform-origin: left center;
  background: transparent;
  --aspect-color: rgba(145, 134, 255, 0.38);
  cursor: pointer;
}

.aspect-line::before {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: var(--aspect-color);
  content: "";
  transform: translateY(-50%);
}

.aspect-line.sextile {
  --aspect-color: rgba(66, 197, 166, 0.58);
}

.aspect-chip.sextile span {
  background: rgba(66, 197, 166, 0.58);
}

.aspect-line.trine {
  --aspect-color: rgba(180, 168, 232, 0.62);
}

.aspect-chip.trine span {
  background: rgba(180, 168, 232, 0.62);
}

.aspect-line.square,
.aspect-line.opposition {
  --aspect-color: rgba(237, 123, 101, 0.58);
}

.aspect-chip.square span,
.aspect-chip.opposition span {
  background: rgba(237, 123, 101, 0.58);
}

.aspect-line.conjunction {
  --aspect-color: rgba(145, 134, 255, 0.7);
}

.aspect-chip.conjunction span {
  background: rgba(145, 134, 255, 0.7);
}

.zodiac-wheel-sign {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--gold);
  font-size: 14px;
  transform: translate(-50%, -50%);
}

.house-mark {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.wheel-center {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  display: grid;
  width: 34%;
  min-width: 112px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px;
  background: rgba(7, 7, 11, 0.66);
  text-align: center;
  transform: translate(-50%, -50%);
}

.wheel-center span,
.wheel-center small {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 900;
}

.wheel-center strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.1;
}

.planet-dot {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-deep);
  background: var(--gold);
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.astro-wheel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.aspect-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.aspect-chip span {
  width: 18px;
  height: 2px;
  margin-right: 7px;
  border-radius: 999px;
  background: rgba(145, 134, 255, 0.55);
}

.astro-detail-grid,
.astro-house-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

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

.astro-detail-grid section,
.astro-house-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.astro-detail-grid section > span,
.astro-house-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.astro-house-grid strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 21px;
}

.astro-house-grid p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.astro-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.astro-row b {
  display: grid;
  width: 32px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  color: var(--ink-deep);
  background: var(--gold);
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.astro-row strong,
.astro-row small {
  display: block;
}

.astro-row small {
  grid-column: 2;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.4;
}

.mbti-grid {
  display: grid;
  gap: 12px;
}

.mbti-group {
  display: grid;
  gap: 8px;
}

.mbti-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.mbti-group-head span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.mbti-group-head small {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

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

.mbti-type {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
  transition: var(--transition-fast);
}

.mbti-type.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.mbti-type strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
}

.mbti-type small {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.35;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--mist));
  transition: width var(--transition-mid);
}

.mbti-question {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.mbti-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.mbti-mode-tabs button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.mbti-mode-tabs button.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.mbti-mode-tabs b,
.mbti-mode-tabs span {
  display: block;
}

.mbti-mode-tabs span,
.mbti-focus {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

.mbti-question small,
.mbti-preview {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

.mbti-preview {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.045);
}

.mbti-preview p {
  margin: 0;
}

.mbti-live-axis {
  display: grid;
  gap: 8px;
}

.mbti-live-axis div {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  gap: 7px;
  align-items: center;
}

.mbti-live-axis i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.mbti-live-axis i b {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--mist));
}

.mbti-live-axis small {
  grid-column: 1 / -1;
  color: var(--ink-muted);
}

.mbti-evidence-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(145, 134, 255, 0.24);
  border-radius: var(--radius-md);
  padding: 14px;
  background:
    linear-gradient(135deg, var(--gold-soft), transparent 70%),
    rgba(255, 255, 255, 0.04);
}

.mbti-evidence-head span,
.mbti-evidence-grid span,
.mbti-alt-types span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.mbti-evidence-head strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 24px;
}

.mbti-evidence-head p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

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

.mbti-evidence-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.mbti-evidence-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.mbti-evidence-grid b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
}

.mbti-evidence-grid i {
  display: block;
  overflow: hidden;
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.mbti-evidence-grid i em {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--mist));
}

.mbti-evidence-grid small {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 900;
}

.mbti-evidence-grid p,
.mbti-alt-types p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.mbti-alt-types {
  display: grid;
  gap: 7px;
}

.mbti-alt-types p {
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.mbti-alt-types b {
  display: block;
  color: var(--ink);
}

.mbti-detail-evidence {
  margin-top: 12px;
}

.mbti-focus {
  margin: 0;
}

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

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

.mbti-choice-pair {
  display: grid;
  gap: 10px;
}

.mbti-question button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
}

.mbti-answer-grid button {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 86px;
}

.mbti-choice-pair button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 76px;
}

.mbti-choice-pair span,
.mbti-answer-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.mbti-choice-pair span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.mbti-choice-pair strong {
  font-size: 18px;
  line-height: 1.45;
}

.mbti-question-actions button {
  min-height: 46px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.mbti-question-actions .primary-action {
  grid-column: 1 / -1;
}

.mbti-axis {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.axis-row {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  gap: 8px;
  align-items: center;
}

.axis-row small {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 11px;
}

.axis-row i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.axis-row b {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--mist);
}

.mbti-confidence {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.mbti-confidence b {
  color: var(--gold);
  font-size: 22px;
}

.mbti-confidence span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

.mbti-save-note {
  border: 1px solid rgba(145, 134, 255, 0.28);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--gold-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.mbti-human-summary {
  margin-top: 18px;
}

.mbti-human-summary .summary-side strong {
  font-size: 28px;
  letter-spacing: 0;
}

.mbti-human-summary .keyword-cloud {
  max-width: 780px;
}

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

.mbti-entry-choice button {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(145, 134, 255, 0.24);
  border-radius: var(--radius-lg);
  padding: 18px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(145, 134, 255, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.045);
  text-align: left;
  transition: var(--transition-fast);
}

.mbti-entry-choice button::after {
  position: absolute;
  right: 16px;
  bottom: 12px;
  color: rgba(145, 134, 255, 0.72);
  content: "→";
  font-size: 28px;
  line-height: 1;
}

.mbti-entry-choice button:hover {
  transform: translateY(-2px);
  border-color: rgba(145, 134, 255, 0.46);
  background: var(--gold-soft);
}

.mbti-entry-choice span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.mbti-entry-choice strong {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.08;
}

.mbti-entry-choice small {
  max-width: 88%;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.mbti-copy.lead {
  font-family: var(--font-serif);
  font-size: 21px;
}

.mbti-profile-action {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.mbti-profile-action button,
.mbti-profile-action span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(145, 134, 255, 0.32);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
}

.mbti-profile-action small {
  color: var(--ink-muted);
  line-height: 1.45;
}

.mbti-stack,
.mbti-watchouts {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

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

.mbti-stack-card,
.mbti-watchouts p {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.mbti-stack-card span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.mbti-stack-card strong {
  display: block;
  margin-top: 5px;
}

.mbti-stack-card p,
.mbti-watchouts p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.mbti-watchouts p {
  margin: 0;
}

.mbti-figures {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mbti-figures-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.mbti-figures-head span,
.mbti-figure-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.mbti-figures-head small {
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

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

.mbti-figure-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.mbti-figure-grid strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 22px;
}

.mbti-figure-grid p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.mbti-pair-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}

.mbti-pair-form .primary-action {
  min-height: 44px;
  padding: 0 18px;
  white-space: nowrap;
}

.mbti-pair-result,
.mbti-pair-dimensions,
.mbti-pair-axis,
.mbti-pair-advice {
  display: grid;
  gap: 10px;
}

.mbti-pair-result {
  margin-top: 14px;
}

.mbti-pair-summary,
.mbti-pair-dimensions section,
.mbti-pair-axis section,
.mbti-pair-advice section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.mbti-pair-summary span,
.mbti-pair-dimensions span,
.mbti-pair-axis span,
.mbti-pair-advice span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.mbti-pair-summary strong,
.mbti-pair-dimensions strong,
.mbti-pair-axis strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 23px;
}

.mbti-pair-summary p,
.mbti-pair-dimensions p,
.mbti-pair-axis p,
.mbti-pair-advice p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.mbti-pair-dimensions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mbti-pair-axis,
.mbti-pair-advice {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mbti-pair-dimensions b {
  float: right;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 28px;
}

.cross-summary-card,
.cross-dimension-grid section,
.cross-tension-grid section,
.cross-advice-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.cross-summary-card {
  margin-top: 12px;
  border-color: rgba(145, 134, 255, 0.25);
  background:
    linear-gradient(135deg, var(--gold-soft), transparent 64%),
    rgba(255, 255, 255, 0.045);
}

.cross-dimension-grid,
.cross-tension-grid,
.cross-advice-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

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

.cross-tension-grid,
.cross-advice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cross-summary-card span,
.cross-dimension-grid span,
.cross-tension-grid span,
.cross-advice-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.cross-summary-card p {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.48;
}

.cross-dimension-grid strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 22px;
}

.cross-dimension-grid p,
.cross-tension-grid p,
.cross-advice-grid p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.dream-search {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.dream-search span {
  font-size: 28px;
}

.dream-suggest-bar {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(156, 161, 255, 0.12), transparent 68%),
    rgba(255, 255, 255, 0.035);
}

.dream-suggest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.dream-suggest-head span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.dream-suggest-head small {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 900;
}

.dream-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dream-no-match {
  border: 1px dashed rgba(145, 134, 255, 0.36);
  border-radius: var(--radius-md);
  padding: 12px;
  background:
    linear-gradient(135deg, var(--gold-soft), transparent 76%),
    rgba(255, 255, 255, 0.035);
}

.dream-no-match span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.dream-no-match p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.58;
}

.dream-suggestions,
.dream-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.dream-suggestions button,
.dream-related button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 900;
}

.dream-suggestions button:hover,
.dream-related button:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.dream-result {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  transition: var(--transition-fast);
}

.dream-result.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.dream-result span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

.dream-result strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.dream-human-summary {
  padding: 22px;
}

.dream-human-summary h3 {
  font-size: clamp(30px, 4vw, 48px);
}

.dream-human-summary .summary-copy {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.55;
}

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

.dream-guidance-grid section,
.dream-reflection {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.dream-guidance-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.dream-guidance-grid p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.dream-scene-note {
  margin-top: 14px;
  border-left: 3px solid var(--gold);
  padding: 8px 0 8px 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.dream-answer-card {
  border: 1px solid rgba(145, 134, 255, 0.26);
  border-radius: var(--radius-md);
  padding: 16px;
  background:
    linear-gradient(135deg, var(--gold-soft), transparent),
    rgba(255, 255, 255, 0.045);
}

.dream-answer-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.dream-answer-card p {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.45;
}

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

.scenario-list section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.scenario-list span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.scenario-list p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.dream-related {
  margin: 14px 0 0;
}

.dream-reflection {
  margin-bottom: 12px;
}

.dream-reflection ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.dream-detail h3,
.compare-result h3,
.share-card h3,
.my-profile-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 30px;
}

.compare-form {
  display: grid;
  gap: 14px;
}

.compare-input-pair {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
  align-items: stretch;
}

.compare-input-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.compare-input-card.mine {
  border-color: rgba(145, 134, 255, 0.26);
  background:
    linear-gradient(135deg, var(--gold-soft), transparent 72%),
    rgba(255, 255, 255, 0.045);
}

.compare-input-card.other {
  border-color: rgba(156, 161, 255, 0.24);
  background:
    linear-gradient(225deg, rgba(156, 161, 255, 0.12), transparent 72%),
    rgba(255, 255, 255, 0.045);
}

.compare-input-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.compare-input-card-head span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.compare-input-card-head strong {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.1;
}

.compare-input-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.58;
}

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

.compare-input-card .ghost-action {
  margin-top: auto;
  min-height: 38px;
}

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

.compare-human-summary {
  padding: 24px;
}

.compare-human-summary .summary-side p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.compare-score {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-deep);
  background: radial-gradient(circle, var(--mist), var(--gold));
}

.compare-score strong {
  font-size: 40px;
}

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

.compare-person {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--person-color) 45%, var(--line));
}

.compare-person::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--person-color);
}

.compare-person.mine {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--person-color) 18%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.045);
}

.compare-person.other {
  background:
    linear-gradient(225deg, color-mix(in srgb, var(--person-color) 18%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.045);
}

.compare-summary-card {
  border: 1px solid rgba(145, 134, 255, 0.24);
  border-radius: var(--radius-md);
  padding: 16px;
  background:
    linear-gradient(135deg, var(--gold-soft), transparent 62%),
    rgba(255, 255, 255, 0.045);
}

.compare-summary-card span,
.compare-factor-grid span,
.compare-advice-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.compare-summary-card p {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.45;
}

.compare-factor-grid,
.compare-element-grid,
.compare-advice-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.compare-factor-grid section,
.compare-advice-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.compare-factor-grid section div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compare-factor-grid b {
  color: var(--gold);
  font-size: 22px;
}

.compare-factor-grid strong {
  display: block;
  margin-top: 6px;
}

.compare-factor-grid p,
.compare-advice-grid p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

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

.share-preview {
  display: grid;
  gap: 14px;
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background:
    radial-gradient(circle at 80% 20%, var(--gold-soft), transparent 30%),
    var(--bg-card-strong);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 55;
  display: none;
  width: min(600px, calc(100vw - 28px));
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 6px;
  background: rgba(9, 10, 18, 0.84);
  box-shadow: var(--shadow-soft);
  transform: translateX(-50%);
  backdrop-filter: blur(20px);
}

:root[data-theme="light"] .bottom-nav {
  border-color: rgba(71, 62, 132, 0.12);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 40px rgba(58, 48, 119, 0.14);
}

.bottom-nav button {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 0;
  border-radius: 22px;
  color: var(--ink-muted);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.bottom-nav b {
  font-size: 11px;
  line-height: 1;
}

.bottom-nav .tab-svg {
  display: block;
  width: 22px;
  height: 22px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav .tab-svg .fill-dot {
  fill: currentColor;
  stroke: none;
}

.tab-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  color: currentColor;
}

.tab-icon::before,
.tab-icon::after {
  position: absolute;
  content: "";
}

.tab-home::before {
  left: 5px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-radius: 2px;
  transform: rotate(45deg);
}

.tab-home::after {
  left: 7px;
  top: 10px;
  width: 9px;
  height: 8px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.tab-chart::before {
  inset: 4px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.tab-chart::after {
  left: 9px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 -6px 0 -1px currentColor,
    6px 0 0 -1px currentColor,
    -6px 0 0 -1px currentColor,
    0 6px 0 -1px currentColor;
}

.tab-zodiac::before {
  left: 10px;
  top: 2px;
  width: 2px;
  height: 18px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.tab-zodiac::after {
  left: 2px;
  top: 10px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.tab-mbti::before {
  left: 4px;
  top: 6px;
  width: 14px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 9px 9px 6px 6px;
}

.tab-mbti::after {
  left: 8px;
  top: 9px;
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    5px 0 0 currentColor,
    2.5px 5px 0 currentColor;
}

.tab-profile::before {
  left: 7px;
  top: 4px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.tab-profile::after {
  left: 4px;
  bottom: 3px;
  width: 14px;
  height: 8px;
  border: 2px solid currentColor;
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
  border-bottom: 0;
}

.knowledge-dialog {
  width: min(560px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--ink);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-strong);
}

.knowledge-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

.close-dialog {
  position: absolute;
  top: 12px;
  right: 12px;
}

@media (max-width: 1180px) {
  html {
    scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .app-shell {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .topbar {
    grid-template-columns: auto minmax(220px, 1fr) auto;
  }

  .top-nav {
    display: none;
  }

  .global-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .bottom-nav {
    display: grid;
  }

  .home-hero,
  .home-dashboard,
  .chart-grid,
  .two-col,
  .dream-layout,
  .compare-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  html {
    scroll-padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  body {
    -webkit-text-size-adjust: 100%;
  }

  .app-shell {
    padding: 10px 10px calc(104px + env(safe-area-inset-bottom));
  }

  .topbar {
    position: relative;
    top: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand-button strong {
    font-size: 18px;
  }

  .top-actions {
    gap: 6px;
  }

  .icon-button,
  .profile-chip {
    min-width: 40px;
    min-height: 40px;
  }

  .brand-button small,
  .profile-chip b {
    display: none;
  }

  .top-nav {
    display: none;
  }

  .nav-item {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .global-search {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 42px;
    padding: 0 12px;
  }

  .search-results {
    position: fixed;
    top: 104px;
    left: 10px;
    right: 10px;
    max-height: min(54vh, 420px);
    overflow: auto;
  }

  .home-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .hero-subtitle {
    margin-top: 10px;
    font-size: 18px;
    line-height: 1.2;
  }

  .hero-one-line {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.65;
  }

  .birth-card {
    gap: 12px;
    padding: 14px;
  }

  .field input,
  .field select,
  .dream-search input {
    min-height: 46px;
    font-size: 16px;
  }

  .primary-action,
  .ghost-action {
    width: 100%;
    min-height: 46px;
  }

  .returning-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .screen-head {
    margin-top: 18px;
  }

  .screen-head h2 {
    font-size: 40px;
    line-height: 1;
  }

  .form-grid,
  .score-grid,
  .compare-people,
  .shensha-list,
  .shensha-section-grid,
  .shensha-reference-grid,
  .shensha-full-grid,
  .flow-calendar,
  .hour-list,
  .pro-suite,
  .pro-luck-grid,
  .pro-flow-grid,
  .scenario-list,
  .mbti-grid,
  .mbti-group-grid,
  .mbti-figure-grid,
  .ten-grid,
  .ten-section-grid,
  .ten-hero {
    grid-template-columns: 1fr;
  }

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

  .pillar {
    gap: 6px;
    padding: 9px 8px 8px;
  }

  .pillar::before {
    height: 4px;
  }

  .pillar-head {
    gap: 2px;
    font-size: 10px;
  }

  .pillar-head b {
    font-size: 10px;
  }

  .glyph-pair {
    gap: 4px;
  }

  .glyph {
    min-height: 44px;
    border-radius: 10px;
  }

  .glyph strong {
    font-size: 28px;
  }

  .glyph span {
    margin-top: 2px;
    font-size: 10px;
  }

  .pillar-human {
    border: 0;
    padding: 0;
    background: transparent;
    text-align: center;
  }

  .pillar-human strong {
    font-size: 11px;
    line-height: 1.25;
  }

  .pillar-human p,
  .pillar-meta {
    display: none;
  }

  .summary-layout {
    grid-template-columns: 1fr;
  }

  .summary-detail-panel {
    grid-template-columns: 1fr;
  }

  .chart-section-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .chart-section-tab {
    min-height: 86px;
    border-radius: 18px;
    padding: 12px;
  }

  .chart-section-tab b {
    font-size: 23px;
  }

  .chart-section-tab span {
    font-size: 11px;
    line-height: 1.35;
  }

  .chart-section-tab em {
    padding: 4px 9px;
    font-size: 10px;
  }

  .chart-overview-grid,
  .relation-reading,
  .chart-relation-actions {
    grid-template-columns: 1fr;
  }

  .chart-detail-gate,
  .chart-detail-actions,
  .mbti-entry-choice,
  .compare-input-pair {
    grid-template-columns: 1fr;
  }

  .section-header {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
  }

  .section-header h2 {
    font-size: 22px;
    line-height: 1.15;
  }

  .bottom-nav {
    display: grid;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(560px, calc(100vw - 20px));
    border-radius: 22px;
  }

  .bottom-nav button {
    min-height: 46px;
  }

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

  .profile-identity-grid,
  .profile-quick-actions,
  .identity-actions,
  .luck-stage-card,
  .luck-advice-grid,
  .bone-scale-head,
  .bone-insight-grid,
  .profile-pair-form,
  .profile-pair-actions {
    grid-template-columns: 1fr;
  }

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

  .profile-history-delete {
    min-height: 40px;
  }

  .saved-profile-actions {
    justify-content: stretch;
  }

  .saved-profile-actions button {
    flex: 1 1 120px;
  }

  .luck-timeline {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }

  .luck-node {
    flex: 0 0 136px;
    scroll-snap-align: start;
  }

  .flow-calendar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .flow-overview {
    grid-template-columns: 1fr;
  }

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

  .flow-day,
  .hour-chip {
    min-height: 76px;
    padding: 8px 7px;
  }

  .birth-card .form-grid,
  .compare-form .form-grid,
  .add-person-form .form-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .compare-people,
  .compare-factor-grid,
  .compare-advice-grid,
  .dream-guidance-grid,
  .scenario-list,
  .mbti-grid,
  .mbti-stack,
  .zodiac-profile-strip,
  .zodiac-tips-list,
  .zodiac-guide-grid,
  .zodiac-relation-grid,
  .astro-detail-grid,
  .astro-house-grid,
  .zodiac-pair-form,
  .zodiac-pair-dimensions,
  .zodiac-pair-advice,
  .zodiac-table-grid,
  .mbti-pair-form,
  .mbti-pair-dimensions,
  .mbti-pair-axis,
  .mbti-pair-advice,
  .mbti-question-actions,
  .mbti-evidence-grid,
  .mbti-evidence-grid.compact,
  .cross-dimension-grid,
  .cross-tension-grid,
  .cross-advice-grid {
    grid-template-columns: 1fr;
  }

  .table-scroll,
  .zodiac-switcher,
  .dream-categories,
  .mini-token-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .zodiac-pill,
  .dream-category,
  .mini-token {
    flex: 0 0 auto;
  }

  .astro-wheel {
    width: min(100%, 326px);
  }

  .planet-dot {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .zodiac-wheel-sign {
    width: 20px;
    height: 20px;
    font-size: 13px;
  }

  .house-mark {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .wheel-center {
    min-width: 98px;
    padding: 8px;
  }

  .wheel-center strong {
    font-size: 14px;
  }

  .astro-wheel-legend {
    gap: 6px;
  }

  .aspect-chip {
    min-height: 34px;
    padding: 0 9px;
    font-size: 11px;
  }

  .knowledge-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 24px);
    overflow: auto;
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .card,
  .birth-card,
  .human-summary-card {
    padding: 16px;
  }

  .glyph-pair {
    grid-template-columns: 1fr 1fr;
  }

  .glyph strong {
    font-size: 28px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

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

  .screen-head h2 {
    font-size: 34px;
  }

  .bottom-nav {
    gap: 2px;
    padding: 4px;
  }

  .bottom-nav button {
    font-size: 10px;
  }

  .daily-line {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .daily-line-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .summary-details summary::after {
    transition: none;
  }

  .human-summary-card.result-flash {
    animation: none;
  }
}
