:root {
  color-scheme: dark;
  --bg: #080b0d;
  --panel: rgba(13, 18, 20, 0.82);
  --panel-strong: rgba(21, 28, 29, 0.9);
  --surface: rgba(247, 232, 195, 0.055);
  --line: rgba(238, 214, 154, 0.2);
  --line-strong: rgba(238, 214, 154, 0.34);
  --text: #f8f1e4;
  --muted: #b8afa0;
  --gold: #e8c36c;
  --gold-soft: #f6d58a;
  --jade: #78c7a9;
  --teal: #5ab7c8;
  --copper: #c67c59;
  --danger: #f09b92;
  --ink: #0b1011;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.48);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(248, 241, 228, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 241, 228, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 16% 16%, rgba(120, 199, 169, 0.2), transparent 27rem),
    radial-gradient(circle at 78% 18%, rgba(232, 195, 108, 0.12), transparent 24rem),
    radial-gradient(circle at 88% 86%, rgba(198, 124, 89, 0.18), transparent 25rem),
    linear-gradient(135deg, #080b0d 0%, #121b1d 44%, #160f0d 100%);
  background-size: 46px 46px, 46px 46px, auto, auto, auto, auto;
}

body.home-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: #000;
}

html {
  scroll-behavior: smooth;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  height: 76px;
  margin: 0;
  padding: 0 clamp(16px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(18px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-brand span {
  width: 44px;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  background: rgba(8, 11, 13, 0.58);
  box-shadow: inset 0 0 28px rgba(232, 195, 108, 0.12);
}

.site-brand strong {
  color: var(--text);
  font-size: 0.98rem;
}

.nav-actions {
  position: fixed;
  top: 18px;
  right: clamp(16px, 4vw, 64px);
  left: auto;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switch select,
.login-button,
.ghost-link {
  border: 1px solid rgba(248, 241, 228, 0.16);
  border-radius: 999px;
  color: var(--text);
  background: rgba(7, 10, 11, 0.42);
  outline: none;
}

.language-switch select {
  height: 40px;
  padding: 0 34px 0 14px;
  cursor: pointer;
}

.login-button {
  min-width: 82px;
  height: 40px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.login-button:hover,
.ghost-link:hover {
  border-color: var(--gold);
  background: rgba(232, 195, 108, 0.08);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(3, 5, 6, 0.62);
  backdrop-filter: blur(14px);
}

.auth-modal.hidden {
  display: none;
}

.auth-card {
  width: min(420px, 100%);
  border: 1px solid rgba(238, 214, 154, 0.22);
  border-radius: 18px;
  padding: 24px;
  position: relative;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 34%),
    rgba(13, 18, 20, 0.94);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.5);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(248, 241, 228, 0.14);
  border-radius: 50%;
  color: var(--text);
  background: rgba(7, 10, 11, 0.42);
  cursor: pointer;
}

.auth-head h2 {
  margin-bottom: 18px;
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-actions {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.auth-actions button {
  border: 0;
  padding: 0;
  color: var(--gold-soft);
  background: transparent;
  cursor: pointer;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.auth-code-row button {
  border: 1px solid rgba(238, 234, 224, 0.24);
  border-radius: 10px;
  padding: 0 14px;
  color: #eeeae0;
  background: transparent;
  cursor: pointer;
}

.home-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  height: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 clamp(16px, 9.5vw, 142px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(18px);
}

.home-brand {
  height: 36px;
  border-radius: 4px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  background: linear-gradient(90deg, rgba(52, 33, 9, 0.92), rgba(13, 10, 6, 0.48));
  font-weight: 800;
}

.home-brand span {
  font-size: 1rem;
}

.home-brand strong {
  color: #f5ac00;
  font-size: 0.92rem;
}

.home-actions {
  position: fixed;
  top: 9px;
  right: clamp(16px, 9.5vw, 142px);
  left: auto;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.round-action,
.login-pill {
  border: 0;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.round-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.language-orb select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.language-orb span:not(.sr-only) {
  font-size: 1.15rem;
}

.login-pill {
  height: 32px;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 0.84rem;
  font-weight: 700;
}

.home-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.home-backdrop,
.home-hero::before,
.home-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.home-backdrop {
  z-index: -3;
  background:
    radial-gradient(circle at 44% 38%, rgba(210, 158, 62, 0.26), transparent 26rem),
    radial-gradient(circle at 72% 72%, rgba(118, 85, 41, 0.22), transparent 22rem),
    linear-gradient(145deg, #050505 0%, #11100d 38%, #18130d 64%, #050505 100%);
  opacity: 1;
  transition: filter 760ms ease, transform 760ms ease, opacity 760ms ease;
}

.home-hero::before {
  z-index: -2;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 34%),
    radial-gradient(circle at 50% 45%, rgba(255, 244, 216, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, rgba(255, 255, 255, 0.035) 48%, rgba(0, 0, 0, 0.5) 100%);
  backdrop-filter: blur(22px) saturate(0.92);
  transition: opacity 760ms ease, transform 760ms cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 760ms ease;
}

.home-hero::after {
  z-index: -1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.48), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.48));
  opacity: 0.46;
  transition: opacity 620ms ease;
}

.home-hero.is-opening .home-backdrop {
  filter: brightness(1.16) contrast(1.05);
  transform: scale(1.018);
}

.home-hero.is-opening::before {
  opacity: 0;
  backdrop-filter: blur(0) saturate(1);
  transform: translateY(-110%);
}

.home-hero.is-opening::after {
  opacity: 0;
}

.home-copy {
  width: min(980px, calc(100% - 32px));
  margin-top: -12px;
  display: grid;
  justify-items: center;
  transition: opacity 420ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms ease;
}

.home-copy.is-leaving {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(-26px);
  pointer-events: none;
}

.home-logo {
  position: relative;
  width: 78px;
  height: 78px;
  margin-bottom: 28px;
  border: 1px solid rgba(228, 193, 116, 0.42);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255, 244, 217, 0.9);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 58%),
    rgba(255, 255, 255, 0.025);
  box-shadow: 0 0 34px rgba(193, 138, 42, 0.16), inset 0 0 28px rgba(228, 193, 116, 0.08);
  animation: title-reveal 1000ms ease both;
}

.home-logo::before,
.home-logo::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.home-logo::before {
  inset: 10px;
  border: 1px solid rgba(255, 244, 217, 0.18);
  border-radius: 50%;
}

.home-logo::after {
  width: 112%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(228, 193, 116, 0.5), transparent);
  transform: rotate(-28deg);
}

.home-logo span {
  position: relative;
  z-index: 1;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 1.55rem;
  font-weight: 800;
}

.home-copy h1 {
  margin: 0 0 42px;
  color: transparent;
  background: linear-gradient(90deg, rgba(255, 244, 217, 0.72), #e4c174 38%, #c18a2a 56%, #f3dfab 78%, rgba(255, 244, 217, 0.72));
  background-clip: text;
  -webkit-background-clip: text;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(2rem, 4.2vw, 4.2rem);
  font-weight: 800;
  line-height: 1.34;
  letter-spacing: 0.08em;
  text-shadow: 0 0 30px rgba(193, 138, 42, 0.2);
  animation: title-reveal 1300ms ease both;
}

.home-copy h1::first-letter {
  color: inherit;
}

.home-copy h1 [data-accent],
.home-copy h1 em {
  color: inherit;
  font-style: normal;
}

.inline-explore {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  background: #050505;
  transition: opacity 520ms ease, transform 780ms cubic-bezier(0.22, 1, 0.36, 1);
  scroll-behavior: smooth;
}

.inline-explore::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 200vh;
  z-index: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08) 36%, rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.3)),
    url("./assets/explore-scene-v2.png") center top / 100% 100% no-repeat;
  pointer-events: none;
}

.inline-explore::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 200vh;
  z-index: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 24%, rgba(222, 178, 94, 0.2), transparent 25rem),
    radial-gradient(circle at 66% 82%, rgba(255, 240, 202, 0.1), transparent 34rem),
    linear-gradient(180deg, rgba(5, 5, 5, 0.18), transparent 31%, rgba(5, 5, 5, 0.08) 54%, rgba(5, 5, 5, 0.46)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.64), transparent 34%, transparent 74%, rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.inline-explore.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.inline-explore-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 18px;
  z-index: 8;
  min-height: 42px;
  border: 1px solid rgba(255, 246, 226, 0.22);
  border-radius: 999px;
  padding: 0 15px;
  color: rgba(255, 246, 226, 0.82);
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(10px);
}

.home-page .inline-explore {
  width: 100%;
  margin: 0;
  padding: 0;
}

.explore-hero {
  min-height: 100vh;
  height: 100vh;
  padding: clamp(32px, 5vw, 68px) max(18px, calc((100vw - 1360px) / 2));
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  isolation: isolate;
  text-align: center;
  overflow: hidden;
}

.explore-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: transparent;
  pointer-events: none;
}

.explore-hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 26vh;
  z-index: -1;
  content: "";
  background: transparent;
  pointer-events: none;
}

.explore-hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 18px;
  transform: translateY(-2vh);
}

.explore-kicker {
  margin: 0;
  color: rgba(244, 218, 158, 0.92);
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(1.35rem, 2.8vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-shadow: 0 0 34px rgba(196, 139, 53, 0.28);
  opacity: 0;
  transform: translateY(22px);
}

.explore-title {
  position: relative;
  z-index: 2;
  margin: 0;
  color: transparent;
  background: linear-gradient(90deg, rgba(246, 232, 196, 0.62), #f4dfaa 34%, #b88737 64%, rgba(255, 248, 230, 0.82));
  background-clip: text;
  -webkit-background-clip: text;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(2.8rem, 6.8vw, 6.4rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.08em;
  text-shadow: 0 0 52px rgba(196, 139, 53, 0.28);
  opacity: 0;
  transform: translateY(34px);
}

.inline-explore.is-visible .explore-kicker {
  animation: explore-title-in 860ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.inline-explore.is-visible .explore-title {
  animation: explore-title-in 900ms 160ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.explore-down {
  position: absolute;
  left: 50%;
  bottom: clamp(28px, 6vh, 58px);
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  display: grid;
  place-items: center;
  color: rgba(8, 7, 5, 0.86);
  background: transparent;
  transform: translateX(-50%);
  text-shadow: 0 1px 10px rgba(255, 236, 190, 0.32);
  transition: color 180ms ease, transform 180ms ease, text-shadow 180ms ease;
}

.explore-down::before {
  display: none;
}

.explore-down span {
  position: relative;
  display: block;
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1;
  animation: down-nudge 1500ms ease-in-out infinite;
}

.explore-down:hover {
  color: rgba(0, 0, 0, 0.96);
  text-shadow: 0 1px 12px rgba(255, 236, 190, 0.48);
  transform: translateX(-50%) translateY(-2px);
}

.calculation-stage {
  min-height: 100vh;
  padding: clamp(28px, 4vw, 54px) max(12px, calc((100vw - 1480px) / 2));
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.calculation-stage::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: transparent;
  pointer-events: none;
}

.stage-links {
  position: absolute;
  top: clamp(38px, 5.2vw, 78px);
  right: clamp(24px, 5.6vw, 92px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(9px, 1.1vw, 15px);
  color: rgba(226, 188, 110, 0.36);
  font-size: clamp(0.72rem, 0.82vw, 0.84rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-align: right;
}

.stage-links::before {
  position: absolute;
  top: 4px;
  right: -12px;
  bottom: 4px;
  width: 1px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(226, 188, 110, 0.26), transparent);
  opacity: 0.5;
}

.stage-links a {
  position: relative;
  padding: 3px 0;
  opacity: 0.72;
  text-shadow: 0 0 18px rgba(203, 150, 61, 0.12), 0 0 24px rgba(0, 0, 0, 0.42);
  transform: translateX(0);
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.stage-links a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.24);
  transform-origin: right;
  transition: opacity 180ms ease, transform 180ms ease;
}

.stage-links a:hover {
  color: rgba(246, 219, 158, 0.78);
  opacity: 1;
  transform: translateX(-4px);
}

.stage-links a:hover::after {
  opacity: 0.24;
  transform: scaleX(1);
}

.explore-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(20px, 3vw, 34px);
}

.explore-action {
  min-width: 138px;
  min-height: 46px;
  border: 1px solid rgba(238, 193, 103, 0.26);
  border-radius: 999px;
  padding: 0 22px;
  color: rgba(255, 246, 226, 0.9);
  background: rgba(24, 19, 13, 0.58);
  box-shadow: 0 12px 34px rgba(8, 11, 13, 0.18);
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.explore-action.primary,
.explore-action:hover {
  border-color: rgba(238, 193, 103, 0.58);
  color: rgba(35, 25, 12, 0.96);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 18px 48px rgba(232, 195, 108, 0.22);
  transform: translateY(-1px);
}

.inline-explore .section-heading {
  justify-self: center;
  width: min(860px, 88vw);
  margin-top: 0;
  margin-bottom: 18px;
  padding-right: 0;
  text-align: center;
}

.inline-explore .section-heading h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.4vw, 2.45rem);
  line-height: 1.08;
}

.inline-explore .app-shell {
  justify-self: center;
  width: min(1320px, 94vw);
  height: min(86vh, 860px);
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: clamp(8px, 1.4vw, 18px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
}

.inline-explore .input-pane,
.inline-explore .output-pane {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.inline-explore .input-pane {
  order: 2;
  grid-template-columns: 1fr;
  min-height: auto;
  overflow: visible;
}

.inline-explore .output-pane {
  order: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  border-radius: 14px;
  padding: clamp(22px, 2.6vw, 38px);
  background: transparent;
}

.inline-explore .form-pane,
.inline-explore .output-pane {
  padding: clamp(18px, 2.3vw, 30px);
}

.inline-explore .form-pane {
  padding: 0;
  gap: 0;
}

.inline-explore .topbar {
  display: none;
}

.inline-explore .topbar h2 {
  font-size: clamp(1.1rem, 1.7vw, 1.42rem);
}

.inline-explore .intro {
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.inline-explore .query-panel {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid rgba(255, 238, 194, 0.16);
  border-radius: 24px;
  padding: 10px;
  background: rgba(24, 19, 13, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 54px rgba(31, 20, 8, 0.28);
}

.saved-profile-note { display: none; }
.query-panel.uses-saved-profile .saved-profile-note {
  margin: 0;
  border: 1px solid rgba(255, 238, 194, 0.14);
  border-radius: 10px;
  padding: 11px 13px;
  display: block;
  color: rgba(255, 246, 226, 0.68);
  background: rgba(24, 19, 13, 0.42);
  font-size: 0.78rem;
  line-height: 1.7;
}
.query-panel.uses-saved-profile > .calendar-segment,
.query-panel.uses-saved-profile > .field-grid,
.query-panel.uses-saved-profile > .place-selects { display: none; }

.chat-thread {
  display: none;
}

.chat-bubble {
  --bubble-bg:
    linear-gradient(145deg, rgba(255, 238, 194, 0.13), rgba(120, 199, 169, 0.07)),
    rgba(20, 24, 20, 0.78);
  --bubble-border: rgba(238, 193, 103, 0.22);
  --bubble-delay: 0ms;
  position: relative;
  max-width: min(680px, 86%);
  border: 1px solid var(--bubble-border);
  border-radius: 18px;
  padding: 14px 17px 15px;
  color: rgba(255, 246, 226, 0.9);
  background: var(--bubble-bg);
  box-shadow: 0 16px 42px rgba(8, 11, 13, 0.24);
  backdrop-filter: blur(12px);
  transform-origin: 20px 100%;
  animation: chat-bubble-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--bubble-delay) both;
}

.chat-bubble.user {
  --bubble-bg:
    linear-gradient(145deg, rgba(232, 195, 108, 0.24), rgba(120, 199, 169, 0.09)),
    rgba(36, 30, 20, 0.82);
  --bubble-border: rgba(232, 195, 108, 0.28);
  align-self: flex-end;
  border-radius: 18px;
  transform-origin: calc(100% - 20px) 100%;
}

.chat-bubble.subtle {
  opacity: 0.82;
}

.empty-state > .chat-bubble:nth-of-type(1) {
  --bubble-delay: 0ms;
}

.empty-state > .chat-bubble:nth-of-type(2) {
  --bubble-delay: 520ms;
}

.empty-state > .chat-bubble:nth-of-type(3) {
  --bubble-delay: 1040ms;
}

.chat-bubble span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: rgba(255, 226, 164, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.chat-bubble span::before {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(238, 193, 103, 0.42);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  content: "知";
  color: rgba(20, 24, 20, 0.92);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 18px rgba(232, 195, 108, 0.18);
  font-size: 0.72rem;
  line-height: 1;
}

.chat-bubble.user span::before {
  content: "你";
  color: rgba(36, 30, 20, 0.92);
  background: linear-gradient(135deg, rgba(255, 238, 194, 0.94), rgba(232, 195, 108, 0.92));
}

.chat-bubble p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
}

.chat-bubble p + p {
  margin-top: 7px;
}

.chat-bubble.reading-bubble {
  max-width: min(860px, 92%);
}

.chat-bubble.reading-bubble p {
  white-space: pre-wrap;
  line-height: 1.8;
}

.chat-bubble.thinking-bubble {
  width: fit-content;
}

.chat-bubble.thinking-bubble span {
  display: flex;
  margin-bottom: 8px;
}

.chat-bubble.thinking-bubble p {
  width: 24px;
  min-width: 24px;
  min-height: 12px;
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.chat-bubble.thinking-bubble i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(238, 193, 103, 0.9);
  animation: thinking-dot 900ms ease-in-out infinite;
}

.chat-bubble.thinking-bubble i:nth-child(2) {
  animation-delay: 120ms;
}

.chat-bubble.thinking-bubble i:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes chat-bubble-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes thinking-dot {
  0%,
  80%,
  100% {
    opacity: 0.36;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.profile-card {
  max-width: min(680px, 86%);
  border: 1px solid rgba(255, 238, 194, 0.14);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  color: rgba(255, 246, 226, 0.9);
  background:
    linear-gradient(145deg, rgba(255, 238, 194, 0.1), rgba(72, 48, 20, 0.08)),
    rgba(24, 19, 13, 0.66);
  box-shadow: 0 14px 42px rgba(28, 18, 8, 0.22);
}

.profile-card.hidden {
  display: none;
}

.profile-card label,
.profile-card fieldset {
  min-width: 0;
}

.profile-card label {
  display: grid;
  gap: 7px;
}

.profile-card span,
.profile-card legend {
  color: rgba(238, 193, 103, 0.86);
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-card fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.profile-card legend {
  grid-column: 1 / -1;
}

.profile-card input[type="date"],
.profile-card input[type="time"],
.profile-card input[type="text"],
.profile-card select {
  height: 40px;
  border: 1px solid rgba(255, 238, 194, 0.16);
  border-radius: 10px;
  color: rgba(255, 248, 232, 0.92);
  background: rgba(12, 10, 8, 0.52);
}

.profile-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.profile-card fieldset label span {
  min-height: 38px;
  border: 1px solid rgba(255, 238, 194, 0.16);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: rgba(255, 246, 226, 0.76);
  background: rgba(12, 10, 8, 0.42);
}

.profile-card input[type="radio"]:checked + span {
  border-color: rgba(238, 193, 103, 0.58);
  color: rgba(255, 248, 232, 0.96);
  background: rgba(177, 126, 44, 0.28);
}

.profile-card button {
  grid-column: 1 / -1;
  min-height: 42px;
  border: 1px solid rgba(238, 193, 103, 0.4);
  border-radius: 12px;
  color: rgba(255, 248, 232, 0.94);
  background: rgba(177, 126, 44, 0.28);
  cursor: pointer;
}

.inline-explore textarea {
  min-height: 72px;
  max-height: 180px;
  border: 0;
  border-radius: 18px;
  padding: 18px 20px;
  color: rgba(255, 248, 232, 0.92);
  background: transparent;
  box-shadow: none;
  font-size: 1rem;
  line-height: 1.65;
  resize: none;
}

.inline-explore textarea::placeholder {
  color: rgba(255, 239, 202, 0.46);
}

.inline-explore .prompt-field {
  min-width: 0;
  gap: 0;
}

.inline-explore .prompt-field textarea:focus {
  box-shadow: none;
}

.inline-explore .error-text {
  grid-column: 1 / -1;
  padding: 0 10px;
}

.inline-explore .primary-button {
  width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 50%;
  padding: 0;
  flex: 0 0 auto;
}

.inline-explore .primary-button span:last-child {
  display: none;
}

.inline-explore .primary-button span:first-child {
  font-size: 1.05rem;
}

.inline-explore .empty-state {
  width: 100%;
  max-width: none;
  color: rgba(255, 246, 226, 0.88);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  text-align: left;
}

.inline-explore .empty-state .coin {
  width: 82px;
  margin-bottom: 18px;
}

.inline-explore .result-content {
  overflow: auto;
  color: rgba(255, 246, 226, 0.9);
}

.inline-explore .query-panel {
  max-width: min(760px, 100%);
  width: 100%;
  margin-inline: auto;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
  border-radius: 18px;
  padding: clamp(14px, 2vw, 20px);
}

.inline-explore .field-grid {
  gap: 10px;
}

.inline-explore input {
  height: 40px;
}

.inline-explore textarea {
  min-height: 76px;
  resize: none;
}

.inline-explore .segmented span {
  min-height: 38px;
}

.inline-explore .primary-button {
  width: 100%;
  height: auto;
  min-height: 46px;
  border-radius: 12px;
}

.inline-explore .primary-button span:last-child {
  display: inline;
}

.inline-explore .primary-button span:first-child {
  font-size: 1rem;
}

.inline-explore .calendar-segment {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-explore .visual-pane {
  display: none;
  background: transparent;
}

.inline-explore .visual-pane::before {
  background: radial-gradient(circle at center, rgba(232, 195, 108, 0.17), transparent 58%);
}

.inline-explore .visual-pane::after {
  background: linear-gradient(180deg, rgba(8, 11, 13, 0.02), rgba(8, 11, 13, 0.42));
}

.inline-explore .plate {
  width: min(18vw, 220px);
}

.inline-explore .brand-mark,
.inline-explore .visual-caption {
  left: 16px;
  right: 16px;
}

.inline-explore .brand-mark {
  top: 16px;
}

.inline-explore .visual-caption {
  bottom: 16px;
}

.inline-explore .empty-state p {
  max-width: 24em;
  margin-inline: auto;
}

.inline-explore .result-content {
  max-height: 100%;
  overflow: auto;
}

.inline-explore .reading-text {
  min-height: 260px;
  max-height: 42vh;
  overflow: auto;
  color: rgba(255, 248, 232, 0.9);
}

.inline-explore .reading-text:empty::before {
  color: rgba(255, 239, 202, 0.46);
}

.inline-explore .pillar-card,
.inline-explore .meta-grid section,
.inline-explore .reading-section {
  border-color: rgba(255, 238, 194, 0.14);
  background: rgba(24, 19, 13, 0.52);
}

.inline-explore .pillar-card strong,
.inline-explore .result-head h2,
.inline-explore h3 {
  color: rgba(255, 239, 202, 0.92);
}

.inline-explore .element-row,
.inline-explore .tag-list span,
.inline-explore .pillar-card small {
  color: rgba(255, 246, 226, 0.72);
}

@keyframes explore-title-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes down-nudge {
  0%,
  100% {
    transform: translateY(-2px);
    opacity: 0.64;
  }

  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}

.home-copy p {
  margin: 0 0 72px;
  color: rgba(244, 242, 238, 0.92);
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  line-height: 2.15;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.82);
}

.explore-button {
  min-width: 220px;
  min-height: 52px;
  border: 1px solid rgba(228, 193, 116, 0.2);
  border-radius: 999px;
  padding: 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 245, 224, 0.92);
  background: linear-gradient(135deg, rgba(76, 62, 42, 0.94), rgba(54, 48, 44, 0.96) 52%, rgba(111, 78, 31, 0.92));
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(246, 213, 138, 0.12);
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.explore-button span {
  display: inline-grid;
  place-items: center;
  transform-origin: center;
  transition: transform 180ms ease;
}

.explore-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(88, 72, 48, 0.96), rgba(62, 55, 50, 0.98) 52%, rgba(125, 89, 37, 0.94));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(246, 213, 138, 0.18);
}

.explore-button:hover span {
  transform: translateX(3px);
}

@keyframes title-reveal {
  from {
    opacity: 0;
    filter: blur(14px);
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.hero-section {
  width: min(1320px, calc(100% - 32px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) 0 76px;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 4vw, 44px);
  align-items: start;
}

.hero-copy {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px clamp(28px, 5vw, 72px);
  align-items: end;
}

.hero-copy h1 {
  max-width: 11em;
  margin: 0;
  font-size: clamp(3.1rem, 5.7vw, 6.2rem);
}

.hero-copy .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.hero-intro {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.8;
}

.hero-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  margin: 4px 0 0;
}

.primary-link,
.ghost-link {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-link {
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 18px 44px rgba(232, 195, 108, 0.22);
}

.primary-link:hover,
.login-button:hover {
  transform: translateY(-1px);
}

.hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: none;
  margin-top: 10px;
}

.hero-stats span {
  min-height: 86px;
  border: 1px solid rgba(248, 241, 228, 0.12);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  background: rgba(7, 10, 11, 0.26);
}

.hero-stats strong {
  color: var(--gold);
  font-size: 0.78rem;
}

.hero-stats b {
  color: var(--text);
  font-size: 0.98rem;
}

.mystic-gallery {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(320px, 1.45fr) repeat(3, minmax(0, 0.85fr));
  grid-template-rows: 420px;
  gap: 16px;
  perspective: 1200px;
}

.mystic-card {
  position: relative;
  min-height: 0;
  margin: 0;
  border: 1px solid rgba(238, 214, 154, 0.18);
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), transparent 34%),
    rgba(13, 18, 20, 0.78);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

.mystic-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
  mix-blend-mode: screen;
}

.image-card {
  transform: rotateY(-3deg) rotateX(1deg);
}

.image-card img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  object-fit: cover;
}

.symbol-card,
.compass-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.symbol-card span {
  color: var(--gold-soft);
  font-size: clamp(4.2rem, 8vw, 7rem);
  font-weight: 800;
  text-shadow: 0 0 34px rgba(232, 195, 108, 0.28);
}

.symbol-card b,
.compass-card b {
  position: relative;
  z-index: 1;
  color: rgba(248, 241, 228, 0.62);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.symbol-card.accent {
  background:
    radial-gradient(circle at 32% 18%, rgba(120, 199, 169, 0.22), transparent 18rem),
    rgba(13, 18, 20, 0.78);
}

.mini-plate {
  width: min(68%, 190px);
  animation-duration: 48s;
}

.tool-wrap {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 78px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.8rem);
}

.app-shell {
  width: 100%;
  min-height: auto;
  margin: 0 auto;
  padding: 0 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  gap: 20px;
}

.input-pane,
.output-pane {
  min-height: calc(100vh - 112px);
  border: 1px solid rgba(238, 214, 154, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 32%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.input-pane::before,
.output-pane::before {
  position: absolute;
  inset: 1px;
  border-radius: 23px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  content: "";
  pointer-events: none;
  z-index: 0;
}

.input-pane {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(390px, 1fr);
}

.visual-pane {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100%;
  background: url("./assets/fortune-hero.png") center / cover;
}

.visual-pane::before,
.visual-pane::after {
  position: absolute;
  inset: 0;
  content: "";
  z-index: 0;
}

.visual-pane::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(232, 195, 108, 0.22), transparent 58%);
  background-size: 36px 36px, 36px 36px, auto;
  mix-blend-mode: screen;
}

.visual-pane::after {
  background:
    radial-gradient(circle at 50% 45%, transparent 0 24%, rgba(8, 11, 13, 0.24) 48%, rgba(8, 11, 13, 0.7) 100%),
    linear-gradient(180deg, rgba(8, 11, 13, 0.08), rgba(8, 11, 13, 0.7));
}

.brand-mark,
.visual-caption {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(248, 241, 228, 0.82);
  letter-spacing: 0;
}

.brand-mark {
  top: 22px;
  font-size: 0.86rem;
}

.brand-mark span {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  background: rgba(8, 11, 13, 0.35);
  box-shadow: inset 0 0 30px rgba(232, 195, 108, 0.12);
}

.brand-mark strong,
.visual-caption span {
  color: rgba(248, 241, 228, 0.52);
  font-size: 0.72rem;
  font-weight: 600;
}

.visual-caption {
  bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(248, 241, 228, 0.14);
}

.visual-caption strong {
  color: var(--text);
  font-size: 0.98rem;
}

.plate {
  width: min(30vw, 330px);
  aspect-ratio: 1;
  position: relative;
  z-index: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(248, 241, 228, 0.16) 0 1deg, transparent 1deg 15deg),
    conic-gradient(from 20deg, rgba(232, 195, 108, 0.18), rgba(120, 199, 169, 0.24), rgba(90, 183, 200, 0.16), rgba(198, 124, 89, 0.22), rgba(232, 195, 108, 0.18)),
    radial-gradient(circle, rgba(248, 241, 228, 0.13), rgba(16, 20, 23, 0.08) 48%, rgba(0, 0, 0, 0.28) 70%);
  box-shadow: inset 0 0 84px rgba(232, 195, 108, 0.16), 0 34px 94px rgba(0, 0, 0, 0.42);
  animation: slow-turn 38s linear infinite;
}

.ring,
.star,
.needle {
  position: absolute;
  display: block;
}

.ring {
  inset: 8%;
  border: 1px solid rgba(232, 195, 108, 0.56);
  border-radius: 50%;
}

.ring-mid {
  inset: 22%;
  border-color: rgba(120, 199, 169, 0.58);
}

.ring-inner {
  inset: 38%;
  border-color: rgba(245, 239, 226, 0.32);
}

.star {
  width: 9px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 22px var(--gold);
}

.s1 {
  top: 24%;
  left: 30%;
}

.s2 {
  right: 25%;
  top: 44%;
  background: var(--jade);
  box-shadow: 0 0 20px var(--jade);
}

.s3 {
  bottom: 26%;
  left: 46%;
  background: var(--copper);
  box-shadow: 0 0 20px var(--copper);
}

.needle {
  width: 44%;
  height: 3px;
  top: 50%;
  left: 50%;
  transform-origin: left center;
  transform: rotate(-28deg);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-soft), rgba(232, 195, 108, 0));
}

.form-pane,
.output-pane {
  padding: clamp(22px, 3vw, 42px);
}

.form-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  position: relative;
  z-index: 1;
}

@keyframes slow-turn {
  to {
    transform: rotate(360deg);
  }
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 8em;
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 4.8vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.65rem;
  line-height: 1.15;
}

h3 {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.96rem;
}

.intro,
.empty-state p {
  color: var(--muted);
  line-height: 1.7;
}

.icon-button,
.primary-button {
  border: 1px solid rgba(248, 241, 228, 0.14);
  cursor: pointer;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  box-shadow: 0 12px 32px rgba(232, 195, 108, 0.18);
}

.icon-button:hover,
.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(232, 195, 108, 0.24);
}

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

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

.date-part-selects {
  display: grid;
  grid-template-columns: minmax(96px, 1.25fr) minmax(76px, 1fr) minmax(76px, 1fr);
  gap: 8px;
}

.date-part-selects select {
  min-width: 0;
  padding-inline: 10px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.field > span,
.segmented legend {
  color: rgba(248, 241, 228, 0.68);
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(248, 241, 228, 0.14);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(7, 10, 11, 0.58);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input,
select {
  height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 112px;
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 195, 108, 0.14), inset 0 0 24px rgba(232, 195, 108, 0.035);
}

.segmented {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.segmented legend {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  min-height: 42px;
  border: 1px solid rgba(248, 241, 228, 0.14);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(7, 10, 11, 0.42);
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.segmented input:checked + span {
  border-color: var(--gold);
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 12px 26px rgba(232, 195, 108, 0.18);
}

.primary-button {
  min-height: 52px;
  border-radius: 8px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  box-shadow: 0 16px 36px rgba(232, 195, 108, 0.18);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.error-text {
  margin: 0;
  color: var(--danger);
  line-height: 1.5;
}

.output-pane {
  display: flex;
  z-index: 1;
}

.empty-state,
.result-content {
  width: 100%;
  position: relative;
  z-index: 1;
}

.empty-state {
  margin: auto;
  text-align: center;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.coin {
  width: 108px;
  aspect-ratio: 1;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  background:
    repeating-conic-gradient(from 0deg, rgba(248, 241, 228, 0.22) 0 2deg, transparent 2deg 16deg),
    radial-gradient(circle, rgba(232, 195, 108, 0.16), rgba(7, 10, 11, 0.82) 58%);
  font-size: 2.5rem;
  font-weight: 800;
  box-shadow: inset 0 0 44px rgba(232, 195, 108, 0.15), 0 20px 60px rgba(232, 195, 108, 0.18);
}

.coin span {
  width: 66px;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 11, 13, 0.72);
}

.hidden {
  display: none;
}

.result-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

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

.pillar-card {
  min-height: 112px;
  border: 1px solid rgba(232, 195, 108, 0.24);
  border-radius: 8px;
  padding: 13px 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(248, 241, 228, 0.055), transparent),
    rgba(232, 195, 108, 0.065);
  text-align: center;
  box-shadow: inset 0 0 40px rgba(232, 195, 108, 0.035);
}

.pillar-card span,
.pillar-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.pillar-card strong {
  color: var(--text);
  font-size: 1.9rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  padding-bottom: 18px;
}

.meta-grid section,
.reading-section {
  border: 1px solid rgba(248, 241, 228, 0.105);
  border-radius: 12px;
  background: rgba(7, 10, 11, 0.26);
}

.meta-grid section {
  padding: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  border: 1px solid rgba(120, 199, 169, 0.42);
  border-radius: 999px;
  padding: 7px 10px;
  color: #d7f1e8;
  background: rgba(120, 199, 169, 0.12);
  font-size: 0.84rem;
}

.element-bars {
  display: grid;
  gap: 9px;
}

.element-row {
  display: grid;
  grid-template-columns: 22px 1fr 20px;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.element-row div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(245, 239, 226, 0.1);
}

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

.element-row b {
  color: var(--text);
  font-weight: 600;
}

.reading-section {
  padding: 18px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.stream-status {
  min-width: 4.5em;
  border: 1px solid rgba(120, 199, 169, 0.28);
  border-radius: 999px;
  padding: 4px 9px;
  color: #ccefe4;
  background: rgba(120, 199, 169, 0.1);
  text-align: center;
  font-size: 0.82rem;
}

.reading-text {
  min-height: 220px;
  max-height: 48vh;
  margin-top: 8px;
  overflow: auto;
  white-space: pre-wrap;
  color: #ddd4c7;
  line-height: 1.78;
}

.reading-text:empty::before {
  content: attr(data-empty);
  color: rgba(248, 241, 228, 0.38);
}

.report-modules {
  display: grid;
  gap: 14px;
  white-space: normal;
}

.report-module {
  border: 1px solid rgba(248, 241, 228, 0.1);
  border-radius: 10px;
  padding: 14px;
  background: rgba(7, 10, 11, 0.22);
}

.report-module h4 {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.96rem;
}

.report-module p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

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

.home-place-field {
  grid-column: 1 / -1;
}

.solar-time-hint {
  color: rgba(248, 241, 228, 0.48);
  font-size: 0.72rem;
  line-height: 1.5;
}

.solar-time-advanced {
  color: rgba(248, 241, 228, 0.5);
  font-size: 0.72rem;
}

.solar-time-advanced summary {
  width: fit-content;
  cursor: pointer;
}

.solar-time-advanced select {
  margin-top: 8px;
  max-width: 260px;
}

.solar-time-result {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(191, 154, 82, 0.22);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(191, 154, 82, 0.06);
  font-size: 0.82rem;
  line-height: 1.6;
}

.home-report > .solar-time-result {
  width: min(1180px, 100%);
  margin: 12px auto 0;
  padding: 11px 15px;
  border-color: rgba(238, 234, 224, 0.1);
  border-radius: 6px;
  color: rgba(238, 234, 224, 0.56);
  background: rgba(238, 234, 224, 0.025);
  font-size: 0.74rem;
  letter-spacing: 0.015em;
}

.home-report > .solar-time-result::before {
  content: "时间校正";
  margin-right: 10px;
  padding-right: 10px;
  border-right: 1px solid rgba(238, 234, 224, 0.14);
  color: rgba(238, 234, 224, 0.82);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.chart-section {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(248, 241, 228, 0.1);
}

.chart-section h3 {
  margin: 0;
  color: var(--gold-soft);
  font-size: 1rem;
}

.fortune-timeline {
  display: grid;
  gap: 10px;
}

.fortune-timeline > div {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.fortune-timeline em,
.fortune-timeline span {
  flex: 0 0 auto;
  border: 1px solid rgba(232, 195, 108, 0.18);
  border-radius: 8px;
  padding: 9px 11px;
  font-style: normal;
}

.fortune-timeline span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.fortune-timeline b {
  color: var(--gold-soft);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .place-selects { grid-template-columns: 1fr; }
}

.report-card {
  min-height: 104px;
  border: 1px solid rgba(232, 195, 108, 0.22);
  border-radius: 8px;
  padding: 12px 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  background: rgba(232, 195, 108, 0.055);
  text-align: center;
}

.report-card span,
.report-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.report-card strong {
  color: var(--text);
  font-size: 1.75rem;
}

.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-tags span {
  border: 1px solid rgba(238, 193, 103, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  color: rgba(255, 246, 226, 0.82);
  background: rgba(232, 195, 108, 0.08);
  font-size: 0.84rem;
}

.disclaimer {
  position: fixed;
  right: 16px;
  bottom: 12px;
  left: 16px;
  color: rgba(245, 239, 226, 0.62);
  text-align: center;
  font-size: 0.8rem;
  pointer-events: none;
}

@media (max-width: 1040px) {
  .hero-section {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  .hero-copy {
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
    gap: 18px 34px;
  }

  .hero-copy h1 {
    max-width: 11em;
  }

  .mystic-gallery {
    min-height: 520px;
    grid-template-columns: minmax(280px, 1.25fr) repeat(3, minmax(0, 0.85fr));
    grid-template-rows: 520px;
  }

  .image-card img {
    min-height: 520px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .input-pane {
    min-height: auto;
  }

  .output-pane {
    min-height: 560px;
  }
}

@media (max-width: 760px) {
  .explore-hero {
    min-height: 100vh;
    height: 100vh;
    padding: 18px 12px;
    background-position: 58% center;
  }

  .explore-kicker {
    font-size: clamp(1.1rem, 6vw, 1.7rem);
    letter-spacing: 0.28em;
    text-indent: 0.28em;
  }

  .explore-title {
    font-size: clamp(2rem, 10vw, 3.8rem);
    letter-spacing: 0.04em;
  }

  .explore-down {
    bottom: 24px;
  }

  .calculation-stage {
    min-height: 100vh;
    padding: 18px 10px;
  }

  .stage-links {
    top: 18px;
    right: 12px;
    left: 12px;
    flex-direction: row;
    justify-content: flex-end;
    gap: 14px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  .stage-links::before {
    display: none;
  }

  .stage-links a::after {
    top: auto;
    right: 0;
    bottom: 2px;
    left: 0;
    width: auto;
    height: 1px;
    transform: scaleX(0.4);
  }

  .stage-links a:hover::after {
    transform: scaleX(1);
  }

  .inline-explore .section-heading {
    width: 100%;
    padding-right: 0;
    margin-bottom: 8px;
  }

  .inline-explore .section-heading h1 {
    font-size: clamp(1.1rem, 5vw, 1.55rem);
  }

  .inline-explore .app-shell {
    width: 100%;
    height: min(88vh, 760px);
    min-height: 0;
    padding: 12px;
    gap: 12px;
    transform: none;
  }

  .inline-explore .input-pane {
    grid-template-columns: 1fr;
  }

  .inline-explore .visual-pane {
    display: none;
  }

  .inline-explore .form-pane,
  .inline-explore .output-pane {
    padding: 14px;
  }

  .inline-explore .query-panel {
    padding: 8px;
    border-radius: 20px;
  }

  .inline-explore textarea {
    min-height: 64px;
    padding: 14px 12px;
  }

  .inline-explore .primary-button {
    width: 46px;
    height: 46px;
    min-height: 46px;
  }

  .inline-explore .intro {
    display: none;
  }

  .inline-explore .query-panel {
    gap: 9px;
  }

  .inline-explore textarea {
    min-height: 54px;
  }

  .inline-explore .reading-text {
    min-height: 96px;
    max-height: 18vh;
  }

  .site-nav {
    width: 100%;
    height: auto;
    min-height: 64px;
    padding: 14px 12px;
    align-items: flex-start;
  }

  .site-brand strong {
    display: none;
  }

  .nav-actions {
    top: 12px;
    right: 12px;
    gap: 8px;
  }

  .home-actions {
    right: 16px;
  }

  .language-switch select {
    width: 116px;
  }

  .login-button {
    min-width: 70px;
  }

  .hero-section,
  .tool-wrap {
    width: min(100% - 24px, 1320px);
  }

  .hero-section {
    padding-bottom: 48px;
  }

  .hero-copy h1 {
    font-size: clamp(2.7rem, 13vw, 4.6rem);
  }

  .hero-copy {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    grid-column: auto;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .mystic-gallery {
    min-height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 320px 190px 190px;
  }

  .image-card {
    grid-column: 1 / -1;
    grid-row: auto;
    transform: none;
  }

  .image-card img {
    min-height: 320px;
  }

  .compass-card {
    grid-column: 1 / -1;
  }

  .input-pane {
    grid-template-columns: 1fr;
  }

  .visual-pane {
    min-height: 280px;
  }

  .plate {
    width: min(58vw, 300px);
  }

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

@media (max-width: 560px) {
  .app-shell {
    padding-top: 10px;
  }

  .site-nav {
    width: 100%;
  }

  .site-brand span {
    width: 40px;
  }

  .language-switch select {
    width: 88px;
    padding-left: 12px;
    padding-right: 18px;
  }

  .login-button {
    min-width: 58px;
  }

  .home-brand strong {
    display: none;
  }

  .home-actions {
    gap: 8px;
  }

  .login-pill {
    padding: 0 12px;
  }

  .hero-section,
  .tool-wrap {
    width: min(100% - 20px, 1320px);
  }

  .hero-actions {
    display: grid;
  }

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

  .mystic-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: 300px repeat(3, 180px);
  }

  .compass-card {
    grid-column: auto;
  }

  .form-pane,
  .output-pane {
    padding: 22px;
  }

  .brand-mark,
  .visual-caption {
    left: 16px;
    right: 16px;
  }

  .visual-caption {
    align-items: flex-end;
  }

  .visual-caption span {
    max-width: 12em;
  }

  .field-grid,
  .meta-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

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

  h1 {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }
}

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

/* Ink-wash homepage */
body.home-page {
  color: #d8d0c0;
  background: #0e0c0a;
  font-family: "Source Han Serif SC", "Noto Serif SC", "PingFang SC", "Songti SC", SimSun, serif;
}

@media (pointer: fine) {
  body.home-page,
  body.home-page a,
  body.home-page button {
    cursor: auto;
  }
}

.home-hero {
  min-height: 720px;
  height: 92svh;
  place-items: center;
  border-bottom: 1px solid rgba(210, 195, 160, 0.1);
}

.home-backdrop {
  background: url("./assets/images/ink-landscape-hero.png") center 48% / cover no-repeat;
  filter: saturate(0.72) contrast(1.04);
}

.home-hero::before {
  background:
    linear-gradient(180deg, rgba(8, 7, 6, 0.32), rgba(8, 7, 6, 0.16) 48%, rgba(8, 7, 6, 0.88)),
    linear-gradient(90deg, rgba(8, 7, 6, 0.48), transparent 30%, transparent 70%, rgba(8, 7, 6, 0.48));
  backdrop-filter: none;
}

.home-hero::after {
  background-image: radial-gradient(circle, rgba(232, 207, 112, 0.52) 0 1px, transparent 1.7px);
  background-size: 130px 150px;
  opacity: 0.26;
}

.destiny-nav {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 5;
  min-height: 54px;
  border-bottom: 1px solid rgba(210, 195, 160, 0.1);
  padding: 0 clamp(16px, 3vw, 48px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(14, 12, 10, 0.88);
  backdrop-filter: blur(14px);
}

.destiny-brand {
  justify-self: start;
  color: #e8cf70;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.destiny-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.destiny-links a,
.destiny-account {
  border-radius: 6px;
  padding: 7px 11px;
  color: #a09888;
  font-size: 0.82rem;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.destiny-links a:hover {
  color: #e8d8b0;
  background: rgba(210, 195, 160, 0.06);
}

.destiny-account {
  justify-self: end;
  border: 1px solid rgba(201, 168, 76, 0.28);
  color: #c9a84c;
}

.home-copy {
  position: relative;
  z-index: 2;
  width: min(700px, calc(100% - 32px));
  margin-top: 12px;
}

.home-rule {
  width: 84px;
  height: 1px;
  margin-bottom: 28px;
  background: linear-gradient(90deg, transparent, #c9a84c, transparent);
}

.home-copy h1 {
  margin: 0;
  color: #e8cf70;
  background: none;
  font-size: clamp(4rem, 7vw, 6.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-shadow: 0 4px 30px rgba(23, 16, 6, 0.54);
}

.home-copy .home-motto {
  margin: 28px 0 20px;
  color: #d4c8b0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  letter-spacing: 0.48em;
  text-indent: 0.48em;
}

.home-copy .home-intro {
  margin: 0 0 36px;
  color: rgba(216, 208, 192, 0.76);
  font-size: 0.98rem;
  line-height: 2;
  letter-spacing: 0.12em;
}

.home-ctas {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.explore-button,
.home-secondary {
  width: 176px;
  min-width: 0;
  min-height: 54px;
  border-radius: 28px;
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
}

.explore-button {
  border-color: rgba(201, 168, 76, 0.34);
  color: #e8cf70;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.24), rgba(201, 168, 76, 0.07));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.34), 0 0 26px rgba(201, 168, 76, 0.08);
}

.home-secondary {
  border: 1px solid rgba(132, 169, 197, 0.24);
  color: #a0c8e8;
  background: linear-gradient(135deg, rgba(91, 127, 165, 0.18), rgba(91, 127, 165, 0.05));
}

.classic-ribbon {
  position: absolute;
  right: 0;
  bottom: 20px;
  left: 0;
  z-index: 2;
  overflow: hidden;
  padding: 10px 18px;
  display: flex;
  justify-content: center;
  gap: 20px;
  color: rgba(180, 170, 150, 0.62);
  font-size: 0.78rem;
  white-space: nowrap;
}

.classic-ribbon i {
  color: rgba(201, 168, 76, 0.44);
  font-style: normal;
}

.home-showcase {
  min-height: 100vh;
  padding: 92px clamp(18px, 5vw, 80px) 110px;
  background: #0e0c0a;
}

/* In-page chart report */
.home-report {
  position: fixed;
  inset: 0;
  z-index: 60;
  min-height: 100vh;
  overflow-y: auto;
  padding: clamp(78px, 8vw, 110px) clamp(18px, 5vw, 72px) 110px;
  color: #d8d0c0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.035), transparent 34rem),
    #050505;
  scroll-margin-top: 20px;
}

.home-report.hidden { display: none; }
body.home-report-open { overflow: hidden; }

.home-report-head,
.report-highlights,
.home-report-layout {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.home-report-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.home-report-head p,
.home-report-head h2 { margin: 0; }
.home-report-head p { color: #8d806b; font-size: 0.72rem; letter-spacing: 0.2em; }
.home-report-head h2 { margin-top: 10px; color: #e8d8b0; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: 0.08em; }
.home-report-head span { display: block; margin-top: 12px; color: #928978; font-size: 0.82rem; }
.home-report-head button {
  border: 1px solid rgba(201, 168, 76, 0.3); border-radius: 999px; padding: 10px 18px;
  color: #d8c27d; background: rgba(201, 168, 76, 0.06);
}

.report-highlights {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.report-highlights article,
.report-block {
  border: 1px solid rgba(180, 160, 140, 0.12);
  border-radius: 10px;
  background: rgba(24, 21, 17, 0.88);
}

.report-highlights article { min-width: 0; padding: 20px; display: grid; gap: 8px; }
.report-highlights span { color: #918673; font-size: 0.74rem; }
.report-highlights strong { overflow: hidden; color: #eadcae; font-size: 1.08rem; text-overflow: ellipsis; white-space: nowrap; }
.report-highlights small { color: #686154; font-size: 0.66rem; }

.home-report-layout { margin-top: 32px; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: start; }
.report-side-nav { position: sticky; top: 76px; display: grid; gap: 3px; }
.report-side-nav strong { margin-bottom: 8px; color: #d6c58e; font-size: 0.78rem; letter-spacing: 0.14em; }
.report-side-nav a { border-left: 1px solid rgba(201, 168, 76, 0.18); padding: 8px 12px; color: #81796b; font-size: 0.76rem; }
.report-side-nav a:hover { border-color: #c9a84c; color: #d8caa4; }
.home-report-content { min-width: 0; display: grid; gap: 18px; }
.report-block { padding: clamp(20px, 3vw, 32px); scroll-margin-top: 72px; }
.report-block > header { margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.report-block > header div { display: flex; align-items: baseline; gap: 12px; }
.report-block > header span { color: rgba(201, 168, 76, 0.38); font-size: 0.76rem; }
.report-block h3 { margin: 0; color: #e2d5b6; font-size: 1.25rem; letter-spacing: 0.1em; }
.data-kind { border: 1px solid; border-radius: 999px; padding: 5px 9px; font-size: 0.64rem; font-style: normal; }
.data-kind.raw { border-color: rgba(109, 155, 188, 0.28); color: #91b8d0; }
.data-kind.derived { border-color: rgba(201, 168, 76, 0.28); color: #c9a84c; }
.data-kind.ai { border-color: rgba(128, 162, 119, 0.32); color: #9fc194; }

.report-data-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.report-data-grid article { border: 1px solid rgba(201, 168, 76, 0.12); border-radius: 8px; padding: 18px 10px; display: grid; justify-items: center; gap: 9px; background: rgba(201, 168, 76, 0.035); }
.report-data-grid article > span { color: #887e6c; font-size: 0.72rem; }
.report-data-grid article strong { color: #eadcae; font-family: STKaiti, KaiTi, serif; font-size: 1.7rem; font-weight: 500; }
.report-data-grid article strong b { color: #c3a655; font-weight: inherit; }
.report-data-grid article small { color: #6f685c; font-size: 0.68rem; }
.report-tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.report-tag-cloud span { min-width: 112px; border: 1px solid rgba(180, 160, 140, 0.14); border-radius: 8px; padding: 12px 15px; display: grid; gap: 5px; }
.report-tag-cloud small { color: #7d7568; }
.report-tag-cloud b { color: #d9cba9; font-weight: 600; }

.home-element-chart { display: grid; gap: 13px; }
.home-element-row { display: grid; grid-template-columns: 30px minmax(100px, 1fr) 76px; gap: 12px; align-items: center; }
.home-element-row > b { color: #d8caa4; }
.home-element-row > div { height: 13px; border: 1px solid rgba(201, 168, 76, 0.12); border-radius: 999px; padding: 2px; background: rgba(0, 0, 0, 0.18); }
.home-element-row i { height: 100%; border-radius: inherit; display: block; background: repeating-linear-gradient(90deg, #b69a4d 0 8px, #d3bc76 8px 10px); }
.home-element-row > span { color: #b8ad98; font-size: 0.8rem; }
.home-element-row small { margin-left: 4px; color: #777064; }
.chart-note { margin: 16px 0 0; color: #777064; font-size: 0.7rem; }

.home-fortune-track,
.home-year-track { position: relative; margin-top: 18px; display: flex; gap: 9px; overflow-x: auto; padding: 8px 0 14px; }
.home-fortune-track::before,
.home-year-track::before { position: absolute; top: 30px; right: 0; left: 74px; height: 1px; content: ""; background: rgba(201, 168, 76, 0.18); }
.home-fortune-track > strong,
.home-year-track > strong { width: 62px; flex: 0 0 62px; padding-top: 14px; color: #8c816e; font-size: 0.72rem; }
.home-fortune-track span,
.home-year-track span { position: relative; min-width: 78px; border: 1px solid rgba(201, 168, 76, 0.16); border-radius: 8px; padding: 11px; display: grid; gap: 5px; background: #181510; text-align: center; }
.home-fortune-track b,
.home-year-track b { color: #ddceaa; }
.home-fortune-track small,
.home-year-track small { color: #756d60; font-size: 0.66rem; }
.report-interpretation p { color: #aaa08d; line-height: 1.85; }
.reading-lead { border-left: 2px solid #9ab58d; padding-left: 16px; }
.reading-lead strong { color: #bed0b5; }
.reading-lead p { margin-bottom: 0; }
.professional-analysis,
.plain-language,
.ai-commentary { border-left: 2px solid #9ab58d; padding-left: 16px; }
.professional-analysis strong { color: #bed0b5; }
.professional-analysis p { margin: 8px 0 0; }
.plain-language { margin-top: 18px; border-left-color: #c9a84c; border-radius: 0 8px 8px 0; padding: 14px 16px; background: rgba(201, 168, 76, 0.045); }
.plain-language strong { color: #d8c27d; }
.plain-language p { margin: 8px 0 0; color: #c2b9a8; }
.ai-commentary { margin-top: 18px; border-left-color: #8aa8bd; border-radius: 0 8px 8px 0; padding: 14px 16px; background: rgba(108, 151, 181, 0.055); }
.ai-commentary strong { color: #a9c7d9; }
.ai-commentary p { margin: 8px 0 0; color: #b8c5cb; }
.literature-evidence { margin-top: 22px; border-top: 1px solid rgba(201, 168, 76, 0.14); padding-top: 18px; }
.literature-evidence > strong { color: #c9a84c; }
.report-interpretation .literature-evidence blockquote { margin: 12px 0 0; border: 0; padding: 12px 14px; background: rgba(201, 168, 76, 0.04); }
.literature-evidence blockquote p { margin: 0; color: #b8ad99; font-family: STKaiti, KaiTi, serif; }
.literature-evidence blockquote footer { margin-top: 8px; color: #877d6d; font-size: 0.76rem; }
.report-interpretation blockquote { margin: 22px 0 0; border-top: 1px solid rgba(201, 168, 76, 0.14); padding: 18px 0 0; color: #9b907b; font-family: STKaiti, KaiTi, serif; }
.report-interpretation blockquote span { margin-right: 12px; color: #c9a84c; font-family: inherit; font-size: 0.72rem; }

@media (max-width: 800px) {
  .home-report-head { align-items: start; flex-direction: column; }
  .report-highlights { grid-template-columns: 1fr 1fr; }
  .home-report-layout { grid-template-columns: 1fr; }
  .report-side-nav { display: none; }
  .report-data-grid { grid-template-columns: 1fr 1fr; }
}

.showcase-heading {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.showcase-heading p {
  margin: 0 0 12px;
  color: #a09888;
  font-size: 0.82rem;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
}

.showcase-heading h2,
.why-section > h2 {
  margin: 0;
  color: #d4c8b0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: 0.16em;
  text-indent: 0.16em;
}

.service-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-item {
  min-height: 230px;
  border: 1px solid rgba(180, 160, 140, 0.11);
  border-radius: 6px;
  padding: 34px 24px;
  color: #d8d0c0;
  background: rgba(24, 22, 18, 0.78);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), inset 0 1px rgba(200, 180, 150, 0.03);
  text-align: center;
}

button.service-item {
  width: 100%;
  font: inherit;
}

.service-item:hover {
  border-color: rgba(201, 168, 76, 0.32);
  background: rgba(29, 26, 21, 0.9);
}

.service-item > span {
  display: block;
  margin-bottom: 18px;
  color: #e8d8b0;
  font-family: STKaiti, KaiTi, serif;
  font-size: 2.7rem;
}

.service-item h3 {
  margin: 0 0 16px;
  color: #d4c8b0;
  font-size: 1.12rem;
  letter-spacing: 0.14em;
}

.service-item p {
  margin: 0;
  color: rgba(180, 170, 150, 0.72);
  font-size: 0.84rem;
  line-height: 1.9;
}

.why-section {
  width: min(1180px, 100%);
  margin: 100px auto 0;
  text-align: center;
}

.reason-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}

.reason-grid article {
  min-height: 168px;
  border: 1px solid rgba(180, 160, 140, 0.08);
  border-radius: 6px;
  padding: 24px;
  background: rgba(24, 22, 18, 0.58);
}

.reason-grid b {
  color: rgba(201, 168, 76, 0.26);
  font-size: 1.6rem;
}

.reason-grid h3 {
  margin: 18px 0 10px;
  color: #d4c8b0;
  font-size: 0.96rem;
}

.reason-grid p {
  margin: 0;
  color: rgba(180, 170, 150, 0.68);
  font-size: 0.78rem;
  line-height: 1.75;
}

@media (max-width: 800px) {
  .home-hero {
    min-height: 660px;
    height: 82svh;
  }

  .destiny-nav {
    min-height: 72px;
    grid-template-columns: auto 1fr;
    align-items: start;
    padding: 12px 14px;
  }

  .destiny-brand {
    padding-top: 3px;
  }

  .destiny-links {
    justify-self: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0;
  }

  .destiny-links a {
    padding: 4px 7px;
    font-size: 0.7rem;
  }

  .destiny-account {
    display: none;
  }

  .home-backdrop {
    background-position: 55% center;
  }

  .home-copy h1 {
    font-size: clamp(3.5rem, 17vw, 5rem);
  }

  .home-copy .home-motto {
    font-size: 0.96rem;
    letter-spacing: 0.28em;
    text-indent: 0.28em;
  }

  .home-copy .home-intro {
    font-size: 0.82rem;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-item {
    min-height: 190px;
  }

  .reason-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Homepage chart-entry form */
.home-intro-state {
  width: 100%;
  display: grid;
  justify-items: start;
}

.home-chart-form {
  width: min(500px, 100%);
  display: grid;
  gap: 16px;
  animation: home-form-enter 320ms ease both;
}

.home-chart-form.hidden,
.home-profile-state.hidden,
.home-intro-state.hidden {
  display: none;
}

.home-form-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-form-head p {
  margin: 0 0 4px;
  color: rgba(238, 234, 224, 0.46);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
}

.home-form-head h2 {
  margin: 0;
  color: #eeeae0;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  letter-spacing: 0.08em;
}

.home-form-back {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(238, 234, 224, 0.2);
  border-radius: 50%;
  color: #eeeae0;
  background: transparent;
  font-size: 1rem;
}

.home-form-back:hover {
  border-color: #eeeae0;
  background: rgba(238, 234, 224, 0.06);
}

.home-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(140px, 0.85fr);
  gap: 22px;
}

.home-form-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.home-form-field .date-part-selects {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
}

.home-form-field > span,
.home-choice-row legend {
  color: rgba(238, 234, 224, 0.46);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.home-form-field input,
.home-form-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(238, 234, 224, 0.16);
  border-radius: 4px;
  padding: 0 12px;
  color: #eeeae0;
  background: #11110f;
  color-scheme: dark;
  outline: none;
}

.home-form-field input:focus,
.home-form-field select:focus {
  border-color: #eeeae0;
  box-shadow: 0 0 0 3px rgba(238, 234, 224, 0.07);
}

.home-choice-row {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.home-choice-row legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
}

.home-choice-row label {
  min-width: 0;
  display: block;
}

.home-choice-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-choice-row span {
  min-height: 42px;
  border: 1px solid rgba(238, 234, 224, 0.14);
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: rgba(238, 234, 224, 0.54);
  background: #11110f;
  font-size: 0.82rem;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.home-choice-row input:checked + span {
  border-color: #eeeae0;
  color: #0a0a09;
  background: #eeeae0;
}

.home-copy .home-form-error {
  margin: -4px 0 0;
  color: #d9a09a;
  font-size: 0.76rem;
  line-height: 1.5;
}

.home-form-submit {
  min-height: 48px;
  border: 1px solid #eeeae0;
  border-radius: 4px;
  color: #0a0a09;
  background: #eeeae0;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.home-form-submit:hover {
  background: #fffdf6;
}

.home-copy .home-form-privacy {
  margin: -7px 0 0;
  color: rgba(238, 234, 224, 0.35);
  font-size: 0.68rem;
  line-height: 1.6;
  text-align: center;
}

@keyframes home-form-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .home-intro-state {
    justify-items: center;
  }

  .home-chart-form {
    width: min(500px, 100%);
    text-align: left;
  }

  .home-hero.is-chart-entry {
    grid-template-rows: auto minmax(230px, 30svh);
    padding-top: 90px;
  }
}

@media (max-width: 500px) {
  .home-chart-form {
    gap: 11px;
  }

  .home-form-head h2 {
    font-size: 1.35rem;
  }

  .home-form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-form-field input,
  .home-form-field select {
    min-height: 42px;
    font-size: 0.78rem;
  }

  .home-choice-row span {
    min-height: 38px;
    font-size: 0.76rem;
  }

  .home-form-submit {
    min-height: 44px;
  }

  .home-hero.is-chart-entry {
    grid-template-rows: auto minmax(230px, 28svh);
    padding: 82px 14px 24px;
  }

  .home-hero.is-chart-entry .book-scene {
    min-height: 230px;
  }
}

@media (max-width: 400px) {
  .home-hero {
    min-height: 640px;
    height: 78svh;
  }

  .home-ctas {
    flex-direction: column;
    align-items: center;
  }

  .explore-button,
  .home-secondary {
    width: 156px;
    min-height: 46px;
    font-size: 0.86rem;
  }

  .classic-ribbon {
    justify-content: flex-start;
  }

  .home-showcase {
    padding: 72px 12px 84px;
  }

  .reason-grid {
    grid-template-columns: 1fr;
  }
}

/* Homepage 3D book composition */
.home-hero {
  grid-template-columns: minmax(320px, 0.82fr) minmax(460px, 1.18fr);
  grid-template-rows: 1fr;
  gap: clamp(12px, 3vw, 56px);
  padding: 72px clamp(24px, 6vw, 104px) 66px;
  background: #0a0a09;
  text-align: left;
}

.home-backdrop {
  background:
    radial-gradient(circle at 72% 46%, rgba(236, 231, 220, 0.075), transparent 31rem),
    radial-gradient(circle at 18% 82%, rgba(236, 231, 220, 0.025), transparent 24rem),
    #0a0a09;
  background-size: auto;
  filter: none;
}

.home-hero::before {
  background: linear-gradient(90deg, rgba(10, 10, 9, 0.12), transparent 60%, rgba(10, 10, 9, 0.3));
}

.home-hero::after {
  opacity: 0.12;
}

.home-copy {
  grid-column: 1;
  justify-self: stretch;
  justify-items: start;
  width: min(560px, 100%);
  margin: 0;
  text-align: left;
}

.home-copy h1 {
  color: #eeeae0;
  font-size: clamp(4rem, 6.2vw, 6.8rem);
  text-indent: 0;
  text-shadow: 0 10px 45px rgba(0, 0, 0, 0.48);
}

.home-copy .home-motto {
  color: #eeeae0;
  text-indent: 0;
}

.home-copy .home-intro {
  color: rgba(238, 234, 224, 0.58);
}

.home-rule {
  background: linear-gradient(90deg, #eeeae0, transparent);
}

.home-ctas {
  justify-content: flex-start;
}

.home-profile-state {
  width: min(560px, 100%);
  display: grid;
  justify-items: start;
}

.home-profile-eyebrow {
  margin: 0 0 14px;
  color: rgba(238, 234, 224, 0.42);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
}

.home-profile-state h1 {
  margin: 0;
  color: #eeeae0;
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 1;
  filter: none;
  transform: none;
  animation: none;
}

.home-profile-summary {
  margin: 22px 0 6px;
  color: rgba(238, 234, 224, 0.78);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
}

.home-profile-place {
  margin: 0;
  color: rgba(238, 234, 224, 0.38);
  font-size: 0.72rem;
}

.home-profile-actions {
  width: 100%;
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home-profile-actions button {
  min-height: 104px;
  border: 1px solid rgba(238, 234, 224, 0.2);
  border-radius: 5px;
  padding: 20px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 9px;
  color: #eeeae0;
  background: rgba(238, 234, 224, 0.035);
  text-align: left;
}

.home-profile-actions button:hover {
  border-color: rgba(238, 234, 224, 0.55);
  background: rgba(238, 234, 224, 0.08);
}

.home-profile-actions .home-profile-report {
  color: #0a0a09;
  background: #eeeae0;
}

.home-profile-actions .home-profile-report:hover { background: #fffdf6; }
.home-profile-actions button:disabled { opacity: 0.42; cursor: wait; }
.home-profile-actions span { font-family: STKaiti, KaiTi, serif; font-size: 1.2rem; }
.home-profile-actions small { opacity: 0.48; font-size: 0.66rem; }

.home-profile-footer {
  width: 100%;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.home-profile-footer button {
  border: 0;
  padding: 6px 0;
  color: rgba(238, 234, 224, 0.62);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.home-profile-footer span {
  color: rgba(238, 234, 224, 0.3);
  font-size: 0.62rem;
  text-align: right;
}

.home-profile-footer span.is-error {
  order: -1;
  flex-basis: 100%;
  max-width: none;
  color: #d9a09a;
  font-size: 0.68rem;
  text-align: left;
}

.explore-button,
.home-secondary {
  border-radius: 4px;
  color: #0a0a09;
  background: #eeeae0;
  box-shadow: none;
}

.explore-button {
  border-color: #eeeae0;
}

.home-secondary {
  border-color: rgba(238, 234, 224, 0.28);
  color: #eeeae0;
  background: transparent;
}

.explore-button:hover {
  color: #0a0a09;
  background: #fffdf6;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
}

.home-secondary:hover {
  border-color: rgba(238, 234, 224, 0.62);
  background: rgba(238, 234, 224, 0.06);
}

.book-scene {
  position: relative;
  grid-column: 2;
  justify-self: stretch;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 540px;
  overflow: hidden;
  isolation: isolate;
  transform-origin: center center;
  transition: transform 900ms cubic-bezier(0.2, 0.82, 0.2, 1), opacity 360ms 680ms ease, filter 900ms ease;
}

.home-hero.is-book-revealing .book-scene {
  z-index: 30;
  transform: translateX(-32%) scale(2.15);
  opacity: 0;
  filter: brightness(1.28) blur(5px);
}

.home-hero.is-book-revealing .home-copy,
.home-hero.is-book-revealing .classic-ribbon,
.home-hero.is-book-revealing .destiny-nav {
  opacity: 0;
  transition: opacity 320ms ease;
}

.home-hero.is-returning .book-scene,
.home-hero.is-returning .home-copy,
.home-hero.is-returning .classic-ribbon,
.home-hero.is-returning .destiny-nav {
  opacity: 1;
  filter: none;
  transform: none;
  transition: none;
}

.home-hero.is-returning .home-chart-form {
  opacity: 1;
  transform: none;
  animation: none;
}

.home-report:not(.hidden) {
  animation: report-page-reveal 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes report-page-reveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

#bookCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

.book-scene-status {
  position: absolute;
  right: clamp(12px, 3vw, 40px);
  bottom: 22px;
  z-index: 2;
  margin: 0;
  display: grid;
  justify-items: end;
  gap: 8px;
  color: rgba(238, 234, 224, 0.52);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
}

.book-scene-status p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.book-scene-status p span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #eeeae0;
  box-shadow: 0 0 12px rgba(238, 234, 224, 0.72);
  animation: book-status-pulse 2.2s ease-in-out infinite;
}

.book-scene-status strong { color: rgba(238, 234, 224, 0.7); font-weight: 500; }
.book-scene-status ol { margin: 0; padding: 0; display: flex; gap: 7px; list-style: none; letter-spacing: 0.08em; }
.book-scene-status li { border: 1px solid rgba(238, 234, 224, 0.1); border-radius: 999px; padding: 4px 7px; color: rgba(238, 234, 224, 0.3); transition: 180ms ease; }
.book-scene-status li::before { content: "○"; margin-right: 4px; }
.book-scene-status li.is-active { border-color: rgba(238, 234, 224, 0.38); color: rgba(238, 234, 224, 0.84); background: rgba(238, 234, 224, 0.06); }
.book-scene-status li.is-active::before { content: "◉"; }
.book-scene-status li.is-done { color: rgba(190, 206, 181, 0.72); }
.book-scene-status li.is-done::before { content: "✓"; }
.book-scene-status[data-stage="error"] strong { color: #c89982; }

.classic-ribbon {
  justify-content: flex-start;
  padding-right: clamp(24px, 6vw, 104px);
  padding-left: clamp(24px, 6vw, 104px);
  color: rgba(238, 234, 224, 0.38);
}

.classic-ribbon i {
  color: rgba(238, 234, 224, 0.2);
}

@keyframes book-status-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 900px) {
  .home-hero {
    height: auto;
    min-height: 100svh;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(330px, 46svh);
    gap: 8px;
    padding: 104px 20px 68px;
  }

  .home-copy {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    justify-items: center;
    width: min(540px, 100%);
    text-align: center;
  }

  .home-copy h1,
  .home-copy .home-motto {
    text-indent: 0;
  }

  .home-copy .home-motto {
    margin: 20px 0 14px;
  }

  .home-copy .home-intro {
    margin-bottom: 22px;
  }

  .home-ctas {
    justify-content: center;
  }

  .book-scene {
    grid-column: 1;
    grid-row: 2;
    min-height: 330px;
  }

  .book-scene-status {
    right: 50%;
    bottom: 0;
    transform: translateX(50%);
    white-space: nowrap;
  }

  .classic-ribbon {
    display: none;
  }
}

@media (max-width: 500px) {
  .home-hero {
    grid-template-rows: auto minmax(280px, 40svh);
    padding: 92px 14px 34px;
  }

  .home-copy h1 {
    font-size: clamp(3rem, 16vw, 4.25rem);
  }

  .home-copy .home-motto {
    font-size: 0.86rem;
  }

  .home-copy .home-intro {
    font-size: 0.76rem;
    line-height: 1.8;
  }

  .home-ctas {
    width: 100%;
    flex-direction: row;
    gap: 8px;
  }

  .home-profile-state { justify-items: center; text-align: center; }
  .home-profile-state .home-rule { margin-bottom: 20px; }
  .home-profile-state h1 { font-size: 2.7rem; }
  .home-profile-summary { margin-top: 16px; font-size: 0.78rem; }
  .home-profile-actions { margin-top: 22px; }
  .home-profile-actions button { min-height: 92px; padding: 15px; }
  .home-profile-footer { align-items: flex-start; }
  .home-profile-footer span { max-width: 190px; }

  .explore-button,
  .home-secondary {
    width: min(46%, 156px);
    min-height: 44px;
    padding: 0 12px;
  }

  .book-scene {
    min-height: 280px;
  }
}

@media (max-width: 800px) {
  .home-hero.is-book-revealing .book-scene {
    transform: translateY(-42%) scale(2.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-scene-status span {
    animation: none;
  }
}

/* Monochrome navigation and account flow */
.destiny-nav {
  border-bottom-color: rgba(238, 234, 224, 0.12);
  background: rgba(10, 10, 9, 0.92);
}

.destiny-brand {
  color: #eeeae0;
}

.destiny-links a {
  color: rgba(238, 234, 224, 0.58);
}

.destiny-links a:hover {
  color: #eeeae0;
  background: rgba(238, 234, 224, 0.06);
}

.destiny-account {
  border: 1px solid #eeeae0;
  color: #0a0a09;
  background: #eeeae0;
}

.destiny-account:hover {
  color: #0a0a09;
  background: #fffdf6;
}

.auth-modal {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.auth-card {
  width: min(420px, 100%);
  border: 1px solid rgba(238, 234, 224, 0.22);
  border-radius: 6px;
  padding: 30px;
  color: #eeeae0;
  background: #11110f;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.64);
}

.auth-close {
  border-color: rgba(238, 234, 224, 0.2);
  color: #eeeae0;
  background: transparent;
}

.auth-close:hover {
  border-color: #eeeae0;
  background: rgba(238, 234, 224, 0.06);
}

.auth-head .eyebrow {
  color: rgba(238, 234, 224, 0.5);
}

.auth-head h2 {
  color: #eeeae0;
  letter-spacing: 0.08em;
}

.auth-form label {
  color: rgba(238, 234, 224, 0.68);
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(238, 234, 224, 0.18);
  border-radius: 4px;
  padding: 0 14px;
  color: #eeeae0;
  background: #0a0a09;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.auth-form input::placeholder {
  color: rgba(238, 234, 224, 0.28);
}

.auth-form input:hover {
  border-color: rgba(238, 234, 224, 0.34);
}

.auth-form input:focus {
  border-color: #eeeae0;
  background: #0d0d0b;
  box-shadow: 0 0 0 3px rgba(238, 234, 224, 0.08);
}

.auth-form .primary-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid #eeeae0;
  border-radius: 4px;
  color: #0a0a09;
  background: #eeeae0;
  box-shadow: none;
}

.auth-form .primary-button:hover {
  background: #fffdf6;
}

.auth-form .primary-button:disabled {
  color: rgba(10, 10, 9, 0.48);
  background: rgba(238, 234, 224, 0.54);
}

.auth-actions button {
  color: rgba(238, 234, 224, 0.62);
}

.auth-actions button:hover {
  color: #eeeae0;
}

#logoutButton {
  color: rgba(238, 234, 224, 0.46);
}

@media (max-width: 500px) {
  .auth-modal {
    padding: 14px;
  }

  .auth-card {
    padding: 26px 20px 22px;
  }
}

@media (max-width: 800px) {
  .destiny-nav {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .destiny-links {
    justify-self: end;
  }

  .destiny-links a:nth-child(n + 2) {
    display: none;
  }

  .destiny-account {
    max-width: 92px;
    min-height: 32px;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Signed-in identity in the homepage navigation */
.destiny-account--signed-in {
  max-width: min(190px, 24vw);
  min-height: 38px;
  padding: 4px 10px 4px 5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(238, 234, 224, 0.34);
  color: #eeeae0;
  background: rgba(238, 234, 224, 0.06);
}

.destiny-account--signed-in:hover {
  color: #fffdf6;
  background: rgba(238, 234, 224, 0.12);
}

.destiny-account-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid rgba(238, 234, 224, 0.42);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #0a0a09;
  background: #eeeae0;
  font-family: STKaiti, KaiTi, serif;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.destiny-account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

@media (max-width: 800px) {
  .destiny-account--signed-in {
    max-width: 116px;
    min-height: 34px;
    padding: 3px 7px 3px 3px;
    gap: 6px;
  }

  .destiny-account-avatar {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .destiny-account-name {
    font-size: 0.72rem;
  }
}

/* Homepage-aligned monochrome chart report */
.home-report { color: #d8d5cc; background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.035), transparent 34rem), #050505; }
.home-report-head p,
.home-report-head span,
.report-highlights span,
.report-highlights small { color: rgba(238, 234, 224, 0.5); }
.home-report-head h2,
.report-highlights strong,
.report-block h3,
.report-data-grid article strong,
.report-tag-cloud b,
.home-element-row > b,
.home-fortune-track b,
.home-year-track b { color: #eeeae0; }
.home-report-head button { border-color: rgba(238, 234, 224, 0.3); color: #eeeae0; background: rgba(238, 234, 224, 0.06); }
.home-report-head button:hover { background: rgba(238, 234, 224, 0.12); }
.report-highlights article,
.report-block { border-color: rgba(238, 234, 224, 0.12); background: rgba(20, 20, 19, 0.9); }
.report-side-nav strong { color: #d8d5cc; }
.report-side-nav a { border-left-color: rgba(238, 234, 224, 0.18); color: rgba(238, 234, 224, 0.46); }
.report-side-nav a:hover { border-color: #eeeae0; color: #eeeae0; }
.report-block > header span { color: rgba(238, 234, 224, 0.38); }
.data-kind.raw,
.data-kind.derived,
.data-kind.ai { border-color: rgba(238, 234, 224, 0.26); color: rgba(238, 234, 224, 0.72); }
.report-data-grid article { border-color: rgba(238, 234, 224, 0.12); background: rgba(238, 234, 224, 0.035); }
.report-data-grid article strong b { color: #d8d5cc; }
.home-element-row > div { border-color: rgba(238, 234, 224, 0.14); }
.home-element-row i { background: repeating-linear-gradient(90deg, #aaa8a1 0 8px, #eeeae0 8px 10px); }
.home-fortune-track::before,
.home-year-track::before { background: rgba(238, 234, 224, 0.18); }
.home-fortune-track span,
.home-year-track span { border-color: rgba(238, 234, 224, 0.16); background: #151514; }
.reading-lead,
.professional-analysis,
.plain-language,
.ai-commentary { border-left-color: rgba(238, 234, 224, 0.58); }
.reading-lead strong,
.professional-analysis strong,
.plain-language strong,
.ai-commentary strong { color: #d8d5cc; }
.plain-language { background: rgba(238, 234, 224, 0.045); }
.ai-commentary { background: rgba(238, 234, 224, 0.035); }
.report-interpretation blockquote { border-top-color: rgba(238, 234, 224, 0.14); }
.report-interpretation blockquote span { color: #eeeae0; }

/* Detailed deterministic chart */
.home-report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.home-report-actions #homeReportExit { border-color: rgba(238, 234, 224, 0.16); color: rgba(238, 234, 224, 0.62); background: transparent; }
.home-report-actions #homeReportExit:hover { border-color: rgba(238, 234, 224, 0.4); color: #eeeae0; background: rgba(238, 234, 224, 0.06); }
.home-report-actions button:disabled { opacity: 0.36; cursor: not-allowed; }

.report-view-switch {
  width: min(1180px, 100%);
  margin: 28px auto 0;
  padding: 4px;
  border: 1px solid rgba(238, 234, 224, 0.12);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(238, 234, 224, 0.035);
}
.report-view-switch button { border: 0; border-radius: 4px; padding: 10px 16px; color: rgba(238, 234, 224, 0.5); background: transparent; cursor: pointer; }
.report-view-switch button[aria-selected="true"] { color: #0a0a09; background: #eeeae0; }
.report-view-switch button:disabled { opacity: 0.3; cursor: not-allowed; }

.detailed-chart-view { width: min(1180px, 100%); margin: 32px auto 0; display: grid; gap: 18px; }
.report-highlights.hidden,
.home-report-layout.hidden,
.detailed-chart-view.hidden { display: none; }
.detailed-chart-intro { padding: 12px 0 8px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.detailed-chart-intro p,
.detailed-chart-intro h2 { margin: 0; }
.detailed-chart-intro p { color: rgba(238, 234, 224, 0.42); font-size: 0.66rem; letter-spacing: 0.22em; }
.detailed-chart-intro h2 { margin-top: 8px; color: #eeeae0; font-family: STKaiti, KaiTi, serif; font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 500; letter-spacing: 0.08em; }
.detailed-chart-intro > span { color: rgba(238, 234, 224, 0.42); font-size: 0.68rem; }

.detail-panel { min-width: 0; border: 1px solid rgba(238, 234, 224, 0.12); border-radius: 10px; padding: clamp(18px, 3vw, 30px); background: rgba(20, 20, 19, 0.9); }
.detail-panel > header { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.detail-panel > header > div { display: flex; align-items: baseline; gap: 12px; }
.detail-panel > header span { color: rgba(238, 234, 224, 0.35); font-size: 0.72rem; }
.detail-panel h3 { margin: 0; color: #eeeae0; font-size: 1.18rem; letter-spacing: 0.1em; }
.detail-panel > header em { border: 1px solid rgba(238, 234, 224, 0.2); border-radius: 999px; padding: 5px 9px; color: rgba(238, 234, 224, 0.58); font-size: 0.62rem; font-style: normal; }

.detail-pillar-table { min-width: 760px; border-top: 1px solid rgba(238, 234, 224, 0.1); border-left: 1px solid rgba(238, 234, 224, 0.1); }
.detail-table-panel { overflow: hidden; }
.detail-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.detail-scroll-hint { display: none; }
.detail-table-row { display: grid; grid-template-columns: 92px repeat(4, minmax(150px, 1fr)); }
.detail-table-row > * { min-width: 0; border-right: 1px solid rgba(238, 234, 224, 0.1); border-bottom: 1px solid rgba(238, 234, 224, 0.1); padding: 13px 12px; }
.detail-table-head { background: rgba(238, 234, 224, 0.04); }
.detail-table-head strong { color: #d8d5cc; font-size: 0.72rem; text-align: center; }
.detail-table-row > b { color: rgba(238, 234, 224, 0.44); font-size: 0.68rem; font-weight: 500; }
.detail-table-row > span { color: rgba(238, 234, 224, 0.76); font-size: 0.7rem; line-height: 1.7; text-align: center; }
.detail-table-row:nth-child(3) > span { color: #eeeae0; font-family: STKaiti, KaiTi, serif; font-size: 1.42rem; }

.detail-relations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.detail-relations article { min-width: 0; border: 1px solid rgba(238, 234, 224, 0.1); border-radius: 7px; padding: 14px; display: grid; gap: 7px; background: rgba(238, 234, 224, 0.025); }
.detail-relations strong { color: rgba(238, 234, 224, 0.52); font-size: 0.64rem; }
.detail-relations b { color: #eeeae0; font-family: STKaiti, KaiTi, serif; font-size: 1.1rem; font-weight: 500; }
.detail-relations span { overflow: hidden; color: rgba(238, 234, 224, 0.42); font-size: 0.64rem; text-overflow: ellipsis; white-space: nowrap; }
.detail-empty { margin: 0; color: rgba(238, 234, 224, 0.46); font-size: 0.76rem; }

.detail-luck-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.detail-luck-summary article { min-width: 0; border-left: 1px solid rgba(238, 234, 224, 0.18); padding: 4px 14px; display: grid; gap: 7px; }
.detail-luck-summary span,
.detail-luck-summary small { color: rgba(238, 234, 224, 0.42); font-size: 0.64rem; }
.detail-luck-summary strong { overflow: hidden; color: #eeeae0; font-size: 0.86rem; text-overflow: ellipsis; white-space: nowrap; }

.detail-luck-matrix { display: grid; gap: 12px; }
.detail-decade { border: 1px solid rgba(238, 234, 224, 0.1); border-radius: 8px; overflow: hidden; }
.detail-decade.is-current { border-color: rgba(238, 234, 224, 0.38); box-shadow: inset 2px 0 #eeeae0; }
.detail-decade > header { padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; background: rgba(238, 234, 224, 0.035); }
.detail-decade > header > div { display: flex; align-items: baseline; gap: 10px; }
.detail-decade > header span,
.detail-decade > header small { color: rgba(238, 234, 224, 0.42); font-size: 0.62rem; }
.detail-decade h4 { margin: 0; color: #eeeae0; font-family: STKaiti, KaiTi, serif; font-size: 1.2rem; font-weight: 500; }
.detail-decade > header b { color: rgba(238, 234, 224, 0.68); font-size: 0.68rem; }
.detail-decade > div { display: grid; grid-template-columns: repeat(10, minmax(82px, 1fr)); overflow-x: auto; }
.detail-decade > div > span { min-width: 82px; border-top: 1px solid rgba(238, 234, 224, 0.08); border-right: 1px solid rgba(238, 234, 224, 0.08); padding: 12px 8px; display: grid; justify-items: center; gap: 5px; }
.detail-decade > div > span.is-current-year { background: rgba(238, 234, 224, 0.09); }
.detail-decade > div small { color: rgba(238, 234, 224, 0.36); font-size: 0.58rem; }
.detail-decade > div strong { color: #eeeae0; font-family: STKaiti, KaiTi, serif; font-size: 1.05rem; font-weight: 500; }
.detail-decade > div em { color: rgba(238, 234, 224, 0.48); font-size: 0.58rem; font-style: normal; }

@media (max-width: 800px) {
  .home-report-actions { width: 100%; justify-content: flex-start; }
  .home-report-actions button { flex: 1; }
  .report-view-switch { margin-top: 22px; }
  .detailed-chart-view { margin-top: 24px; }
  .detailed-chart-intro { align-items: start; flex-direction: column; gap: 8px; }
  .detail-panel { padding: 18px 14px; }
  .detail-panel > header { align-items: start; }
  .detail-relations { grid-template-columns: 1fr 1fr; }
  .detail-luck-summary { grid-template-columns: 1fr 1fr; gap: 18px 8px; }
  .detail-decade > header { align-items: start; flex-direction: column; gap: 8px; }
}

@media (max-width: 440px) {
  .detail-relations,
  .detail-luck-summary { grid-template-columns: 1fr; }
}

/* Mobile reading and touch experience */
.report-collapse-toggle { display: none; }

@media (max-width: 800px) {
  .destiny-links a,
  .destiny-account,
  .profile-home-link,
  .profile-section-head > a,
  .saved-archive-actions button,
  .archives-empty a,
  .setting-row button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .home-form-back,
  .auth-close,
  .archive-modal-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .home-form-field input,
  .home-form-field select,
  .home-choice-row span,
  .home-form-submit {
    min-height: 46px;
    font-size: max(0.86rem, 16px);
  }

  .home-report {
    padding: 72px 14px calc(54px + env(safe-area-inset-bottom));
    scroll-padding-top: 58px;
    overscroll-behavior: contain;
  }
  .home-report:not(.hidden) { animation: none; }

  .home-report-head h2 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .home-report-head span { line-height: 1.7; overflow-wrap: anywhere; }
  .home-report-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .home-report-actions button { min-height: 46px; padding: 10px 12px; white-space: nowrap; }

  .report-highlights { margin-top: 24px; gap: 8px; }
  .report-highlights article { padding: 15px 13px; }
  .report-highlights strong { font-size: 1rem; }

  .home-report-layout { margin-top: 18px; gap: 14px; }
  .report-side-nav {
    top: 0;
    z-index: 5;
    margin: 0 -14px;
    padding: 8px 14px;
    border-block: 1px solid rgba(238, 234, 224, 0.1);
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    background: rgba(5, 5, 5, 0.94);
    backdrop-filter: blur(12px);
    scrollbar-width: thin;
  }
  .report-side-nav strong { display: none; }
  .report-side-nav a {
    min-height: 40px;
    flex: 0 0 auto;
    border: 1px solid rgba(238, 234, 224, 0.14);
    border-radius: 999px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }

  .home-report-content { gap: 12px; }
  .report-block { padding: 18px 14px; scroll-margin-top: 64px; }
  .report-block > header,
  .detail-panel > header {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
  }
  .report-block > header > div,
  .detail-panel > header > div { min-width: 0; }
  .report-block > header > em,
  .detail-panel > header > em { grid-column: 1; justify-self: start; }
  .report-collapse-toggle {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 52px;
    min-height: 44px;
    border: 1px solid rgba(238, 234, 224, 0.18);
    border-radius: 999px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(238, 234, 224, 0.7);
    background: rgba(238, 234, 224, 0.035);
    font-size: 0.7rem;
  }
  .report-block.is-collapsed > :not(header),
  .detail-panel.is-collapsed > :not(header) { display: none; }
  .report-block.is-collapsed > header,
  .detail-panel.is-collapsed > header { margin-bottom: 0; }

  .report-data-grid article { padding: 15px 8px; }
  .report-tag-cloud span { min-width: calc(50% - 5px); }
  .home-element-row { grid-template-columns: 24px minmax(80px, 1fr) 68px; gap: 8px; }
  .report-interpretation p,
  .professional-analysis p,
  .plain-language p {
    overflow-wrap: anywhere;
    font-size: 0.9rem;
    line-height: 1.9;
  }
  .professional-analysis,
  .plain-language,
  .ai-commentary { padding-left: 13px; }

  .home-fortune-track,
  .home-year-track,
  .detail-table-scroll,
  .detail-decade > div {
    scroll-snap-type: x proximity;
    scrollbar-color: rgba(238, 234, 224, 0.32) rgba(238, 234, 224, 0.06);
  }
  .home-fortune-track span,
  .home-year-track span,
  .detail-decade > div > span { scroll-snap-align: start; }

  .detail-scroll-hint {
    margin: -7px 0 12px;
    display: block;
    color: rgba(238, 234, 224, 0.42);
    font-size: 0.68rem;
    line-height: 1.6;
  }
  .detail-table-scroll {
    margin-right: -14px;
    padding-right: 14px;
    background: linear-gradient(90deg, transparent calc(100% - 24px), rgba(238, 234, 224, 0.06));
  }
  .detail-pillar-table { min-width: 680px; }
  .detail-table-row { grid-template-columns: 78px repeat(4, minmax(140px, 1fr)); }
  .detail-table-row > :first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #141413;
  }
  .detail-table-head > :first-child { z-index: 3; background: #1a1a19; }

  .inline-explore .reading-text {
    max-height: none;
    overflow: visible;
    overflow-wrap: anywhere;
    font-size: 0.92rem;
    line-height: 1.85;
  }
  .inline-explore .chat-bubble { max-width: 92%; }
  .inline-explore .chat-bubble p { overflow-wrap: anywhere; line-height: 1.8; }
  .inline-explore .primary-button { width: 100%; height: auto; min-height: 48px; }
  .inline-explore-close { left: 12px; min-height: 44px; padding-inline: 13px; }
  .inline-explore .output-pane {
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .inline-explore textarea { font-size: 16px; }

  .archive-modal-card { overscroll-behavior: contain; }
  .archive-modal-reading p { overflow-wrap: anywhere; font-size: 0.84rem; line-height: 1.85; }
  .profile-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (max-width: 430px) {
  .destiny-nav { padding-inline: 10px; gap: 4px; }
  .destiny-links a { padding-inline: 6px; }
  .destiny-account--signed-in { max-width: 104px; }
  .home-profile-actions { grid-template-columns: 1fr; }
  .home-profile-actions button { min-height: 78px; }
  .home-profile-footer { justify-content: center; }
  .home-profile-footer span { max-width: 100%; text-align: center; }
  .report-data-grid { gap: 8px; }
  .report-block h3 { font-size: 1.08rem; }
  .profile-section-head { align-items: flex-start; }
  .archive-card { grid-template-columns: 1fr; }
  .archive-emblem { width: 44px; height: 44px; }
  .archive-details { grid-column: 1; }
  .saved-archive-actions { display: grid; grid-template-columns: 1fr auto; }
  .saved-archive-actions button { min-height: 44px; }
  .archive-modal { padding: 0; align-items: stretch; }
  .archive-modal-card { width: 100%; max-height: 100svh; border-radius: 0; padding: 26px 16px calc(26px + env(safe-area-inset-bottom)); }
}
