@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@560;700&family=Noto+Sans+SC:wght@400;500;700&display=swap");

:root {
  --ink: #101816;
  --ink-2: #1a2823;
  --jade: #3f6f5c;
  --jade-soft: #7fa896;
  --gold: #c9a24a;
  --gold-soft: #e0c789;
  --paper: #eef2ef;
  --panel: rgba(244, 247, 245, 0.92);
  --text: #17241f;
  --muted: #5d6d66;
  --line: rgba(23, 36, 31, 0.12);
  --white: #f7faf8;
  --danger: #8b2e3a;
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --display: "Cormorant Garamond", "Noto Serif SC", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* ===== Landing ===== */
.landing {
  min-height: 100vh;
  color: var(--white);
  background: #0b100e;
  position: relative;
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(180deg, rgba(10,16,14,0.72), rgba(10,16,14,0.18));
  backdrop-filter: blur(10px);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: 0.18em;
}
.brand-link img { width: 34px; height: 34px; display: block; }
.brand-link .name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}
.nav-links {
  display: flex;
  gap: 1.2rem;
  font-size: 0.9rem;
  color: rgba(247, 250, 248, 0.78);
}
.nav-links a:hover { color: var(--gold-soft); }
.nav-actions { display: flex; align-items: center; gap: 0.55rem; }
.btn-ghost {
  border: 0;
  background: transparent;
  color: rgba(247,250,248,0.9);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.btn-solid {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  color: #12201b;
  background: var(--gold);
  font-weight: 600;
}
.btn-solid:hover { filter: brightness(1.05); }
.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.08);
}
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.9rem 2rem;
  border: 1px solid rgba(224, 199, 137, 0.55);
  color: var(--white);
  background: rgba(23, 40, 34, 0.45);
  backdrop-filter: blur(6px);
  cursor: pointer;
  letter-spacing: 0.18em;
}
.btn-line:hover { border-color: var(--gold-soft); background: rgba(63, 111, 92, 0.35); }

.hero-photo {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(8,12,10,0.28) 0%, rgba(10,16,14,0.4) 48%, #0b100e 100%),
    url("/static/assets/hero-bg.jpg?v=lake3") center / cover no-repeat;
  padding: 6rem 1.25rem 4rem;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(63,111,92,0.16), transparent 65%),
    linear-gradient(180deg, rgba(8,12,10,0.12) 0%, transparent 42%, #0b100e 100%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; animation: rise 0.9s ease both; }
.hero-mark {
  width: 88px;
  height: 88px;
  margin-bottom: 1.1rem;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 700;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
}
.hero .domain {
  margin: 0.35rem 0 1rem;
  color: var(--gold-soft);
  letter-spacing: 0.28em;
  font-size: 0.82rem;
}
.hero-slogan {
  margin: 0 0 1.8rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  color: rgba(247, 250, 248, 0.9);
  font-size: 1.12rem;
  letter-spacing: 0.14em;
}
.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 2.4rem auto 0;
  width: fit-content;
  color: rgba(247,250,248,0.62);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  animation: floatY 2.4s ease-in-out infinite;
}

/* full-bleed method panels */
.showcase { display: grid; gap: 0; }
.showcase-panel {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  padding: 4rem 1.5rem;
  background-color: #101816;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.showcase-panel.alt { justify-content: flex-end; }
.showcase-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,12,10,0.82) 0%, rgba(8,12,10,0.45) 48%, rgba(8,12,10,0.2) 100%);
}
.showcase-panel.alt .showcase-veil {
  background: linear-gradient(270deg, rgba(8,12,10,0.84) 0%, rgba(8,12,10,0.45) 48%, rgba(8,12,10,0.18) 100%);
}
.showcase-copy {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  padding: 1.5rem;
}
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--gold-soft);
  letter-spacing: 0.2em;
  font-size: 0.82rem;
}
.showcase-copy h2 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.16em;
}
.showcase-copy p {
  margin: 0 0 1.4rem;
  color: rgba(247,250,248,0.78);
  line-height: 1.75;
  font-size: 1.02rem;
}
.showcase-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.showcase-actions .btn-ghost {
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
}
.ask-band {
  position: relative;
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 4rem 1.25rem;
  background-color: #101816;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  text-align: center;
}
.ask-veil {
  position: absolute;
  inset: 0;
  background: rgba(8,12,10,0.72);
}
.ask-inner { position: relative; z-index: 2; width: min(680px, 100%); }
.ask-inner h2 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.12em;
}
.ask-lead {
  margin: 0 auto 1.4rem;
  color: rgba(247,250,248,0.75);
  line-height: 1.7;
  max-width: 34rem;
}
.ask-form {
  display: flex;
  gap: 0.6rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  backdrop-filter: blur(8px);
}
.ask-form input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  outline: none;
  min-width: 0;
}
.ask-form input::placeholder { color: rgba(255,255,255,0.45); }
.ask-note {
  margin: 0.9rem 0 0;
  color: rgba(247,250,248,0.45);
  font-size: 0.82rem;
}

.landing-section {
  position: relative;
  z-index: 2;
  padding: 4rem 1.25rem;
}
.landing-section.on-dark {
  background: linear-gradient(180deg, #0b100e, #121a17);
}
.landing-section h2 {
  text-align: center;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: 0.2em;
  margin: 0 0 0.4rem;
}
.landing-section .sub {
  text-align: center;
  color: rgba(247,250,248,0.6);
  margin: 0 0 2rem;
}
.feature-grid {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.feature-card {
  display: block;
  border-radius: 18px;
  padding: 1.35rem 1.3rem;
  border: 1px solid rgba(232, 226, 212, 0.12);
  background: rgba(16, 28, 24, 0.55);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease;
  min-height: 150px;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 162, 74, 0.4);
}
.feature-card .num {
  margin: 0 0 0.45rem;
  color: var(--gold);
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}
.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}
.feature-card p {
  margin: 0;
  color: rgba(247,250,248,0.68);
  line-height: 1.6;
  font-size: 0.94rem;
}
.feature-card.wide { grid-column: 1 / -1; }

.faq-section {
  background: #eef2ef;
  color: var(--text);
  padding: 4rem 1.25rem;
}
.faq-inner { width: min(760px, 100%); margin: 0 auto; }
.faq-section .eyebrow { color: var(--jade); }
.faq-section h2 {
  margin: 0 0 1.4rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0.12em;
}
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--jade); font-size: 1.2rem; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.letter-section {
  background: linear-gradient(180deg, #121a17, #0b100e);
  padding: 3.5rem 1.25rem 4rem;
}
.letter-card {
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 2rem 1.4rem;
  background: rgba(255,255,255,0.04);
}
.letter-card h2 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  letter-spacing: 0.12em;
}
.letter-card p { color: rgba(247,250,248,0.68); line-height: 1.65; }
.letter-form {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  flex-wrap: wrap;
}
.letter-form input {
  width: min(320px, 100%);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.25);
  color: #fff;
  padding: 0.8rem 1rem;
}
.letter-hint { margin: 0.8rem 0 0; color: var(--gold-soft); font-size: 0.86rem; min-height: 1.2em; }

.landing-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.8rem 1rem 2.4rem;
  color: rgba(247,250,248,0.45);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #0b100e;
}
.landing-footer.rich { text-align: left; padding: 2.5rem 1.25rem 2.8rem; }
.footer-grid {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 1.5rem;
}
.footer-grid h4 {
  margin: 0 0 0.7rem;
  color: rgba(247,250,248,0.85);
  letter-spacing: 0.1em;
}
.footer-grid a, .footer-grid p {
  display: block;
  margin: 0.35rem 0;
  color: rgba(247,250,248,0.5);
  line-height: 1.5;
}
.footer-grid a:hover { color: var(--gold-soft); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* ===== Login: stone studio ===== */
.login-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(16,24,22,0.04), transparent 40%),
    linear-gradient(180deg, #e8eee9 0%, #dfe7e2 100%);
  color: var(--text);
}
.login-top {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: rgba(244, 247, 245, 0.8);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.login-top .brand-link .name { color: var(--ink); font-size: 1.15rem; }
.login-top .links {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.login-layout {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  min-height: calc(100vh - 58px);
}
.login-form-pane {
  background: rgba(255,255,255,0.86);
  padding: 2.3rem 2rem;
  border-right: 1px solid var(--line);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}
.login-brand img { width: 40px; height: 40px; }
.login-brand .title {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  font-weight: 700;
}
.login-brand .domain {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}
.login-form-pane h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  letter-spacing: 0.06em;
}
.login-form-pane .lead {
  margin: 0 0 1.3rem;
  color: var(--muted);
}
.auth-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.15rem;
}
.auth-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.55rem 0;
  cursor: pointer;
}
.auth-tab.active {
  color: var(--jade);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--gold);
}
.auth-field {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.84rem;
  color: var(--muted);
}
.auth-field input, .field input, .field select, .field textarea {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid rgba(23,36,31,0.14);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #fff;
  color: var(--text);
}
.auth-field input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(63, 111, 92, 0.28);
  border-color: transparent;
}
.auth-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.15rem 0 0.95rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.auth-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.btn-login {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1rem;
  cursor: pointer;
  color: #12201b;
  background: var(--gold);
  font-weight: 700;
  letter-spacing: 0.12em;
}
.btn-login:disabled { opacity: 0.65; cursor: wait; }
.auth-switch {
  margin-top: 1.1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.auth-switch a { color: var(--jade); font-weight: 600; }
.login-art {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(201,162,74,0.16), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(63,111,92,0.18), transparent 45%),
    linear-gradient(160deg, #1a2823, #101816 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.login-art::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(201,162,74,0.28);
  box-shadow: inset 0 0 0 28px rgba(127,168,150,0.06);
}
.login-art-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
}
.login-art-inner img { width: 92px; height: 92px; margin-bottom: 1rem; }
.login-art-inner .big {
  font-family: var(--display);
  font-size: 2.6rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  margin: 0;
}
.login-art-inner .tip {
  margin: 0.6rem 0 0;
  color: rgba(247,250,248,0.65);
  letter-spacing: 0.14em;
}

.status {
  margin-top: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(63, 111, 92, 0.1);
  color: var(--jade);
  font-size: 0.9rem;
}
.status.error {
  background: rgba(139, 46, 58, 0.1);
  color: var(--danger);
}

/* ===== App pages ===== */
.app-body {
  min-height: 100vh;
  background:
    radial-gradient(800px 360px at 8% -8%, rgba(63,111,92,0.12), transparent 55%),
    radial-gradient(700px 320px at 100% 0%, rgba(201,162,74,0.1), transparent 50%),
    linear-gradient(180deg, #eef2ef 0%, #e4ebe6 100%);
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: rgba(244, 247, 245, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.app-header .brand-link .name {
  color: var(--ink);
  font-size: 1.15rem;
}
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.app-nav a, .app-nav button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.86rem;
  cursor: pointer;
}
.app-nav a:hover, .app-nav button:hover {
  color: var(--ink);
  background: rgba(63,111,92,0.08);
}
.app-nav a.active {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
  font-weight: 600;
}
.app-nav .nav-user {
  color: var(--jade);
  font-size: 0.86rem;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
}
.app-nav .nav-user:hover {
  background: rgba(63,111,92,0.08);
  border-color: var(--line);
}
.landing-user {
  color: rgba(247,250,248,0.92) !important;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
}
.app-main {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.app-hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: 0.12em;
}
.app-hero .lead {
  margin: 0 0 1.35rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 34rem;
}
.input-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1rem;
}
.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}
.mode-tab input { accent-color: var(--jade); }
.mode-tab:has(input:checked) {
  border-color: var(--jade);
  color: var(--jade);
  background: rgba(45, 90, 74, 0.06);
}
.field-wide { grid-column: 1 / -1; }
.bazi-mode-panel .hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}
.bazi-mode-panel .hint.error { color: #b42318; }
.bazi-reverse-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.bazi-dates {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.bazi-date-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
.bazi-date-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.92rem;
}
.bazi-date-option input { accent-color: var(--jade); }

.panel, .report {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.35rem;
  box-shadow: 0 16px 36px rgba(16, 24, 22, 0.05);
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.field, .panel label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.actions {
  margin-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}
.hint { margin: 0; color: var(--muted); font-size: 0.85rem; }
.btn-primary {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  cursor: pointer;
  color: #12201b;
  background: var(--gold);
  font-weight: 700;
}
.btn-primary:disabled { opacity: 0.65; cursor: wait; }
.btn-ghost-dark {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  cursor: pointer;
}
.report { margin-top: 1.2rem; }
.report-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.meta {
  margin: 0 0 0.3rem;
  color: var(--jade);
  font-size: 0.85rem;
}
.report-head h2 {
  margin: 0;
  font-size: 1.4rem;
}
.report-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.toc a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  background: #fff;
}
.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 1rem 0;
}
.score-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
}
.score-card .label { margin: 0; color: var(--muted); font-size: 0.85rem; }
.score-card .value {
  margin: 0.25rem 0;
  font-size: 2rem;
  color: var(--ink);
  font-family: var(--display);
}
.score-card .desc { margin: 0; }
.score-card .tip { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

/* 八字简批 */
.jianpi-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.2rem 0 1rem;
}
.jianpi-pill {
  min-width: 7.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.jianpi-pill .k {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.jianpi-pill .v {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
}
.jianpi-note {
  flex: 1 1 100%;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.tag-chip {
  display: inline-block;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.82rem;
  color: var(--jade);
}
.jianpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 1rem 0 1.25rem;
}
.jianpi-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  background: #fff;
}
.jianpi-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: var(--jade);
}
.jianpi-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--ink);
}
.jianpi-block {
  margin: 0 0 1.2rem;
}
.jianpi-block h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}
.jianpi-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.7;
}
.jianpi-remedy {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.jianpi-remedy-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #fff;
}
.jianpi-remedy-item .label {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.jianpi-remedy-item .value {
  margin: 0.3rem 0 0;
  line-height: 1.6;
}
.jianpi-disclaimer {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.cast-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.cast-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  text-align: center;
  background: #fff;
}
.cast-item .glyph { font-size: 1.5rem; margin: 0.2rem 0; }
.cast-item .name { margin: 0; font-weight: 600; }
.cast-item .sub { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.8rem; }
.theme-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.theme-pills label {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  background: #fff;
  cursor: pointer;
}
.md-body { line-height: 1.8; font-size: 1.02rem; }
.md-body h2, .md-body h3 { margin: 1.5rem 0 0.65rem; }
.md-body h2 {
  font-size: 1.25rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}
.md-body h2:first-child { border-top: 0; margin-top: 0; }
.md-body p { margin: 0.7rem 0; }
.md-body ul, .md-body ol { padding-left: 1.2rem; }
.md-body strong { color: var(--jade); }
.md-body blockquote {
  margin: 0.9rem 0;
  padding-left: 0.9rem;
  border-left: 3px solid var(--gold);
  color: var(--muted);
}
textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid rgba(23,36,31,0.14);
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff;
}

/* 报告能量图 + 存档 */
.report-rich { overflow: visible; }
.energy-panel {
  margin: 0.4rem 0 1.4rem;
  padding: 1.1rem 1rem 0.9rem;
  border-radius: 16px;
  background:
    radial-gradient(600px 180px at 20% 0%, rgba(201,162,74,0.14), transparent 60%),
    linear-gradient(180deg, #f7faf8 0%, #eef3f0 100%);
  border: 1px solid rgba(23,36,31,0.08);
}
.energy-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 0.4rem;
  padding: 0 0.35rem;
}
.energy-head .eyebrow {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.18em;
  font-size: 0.78rem;
}
.energy-head h3 {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.12em;
}
.energy-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}
.energy-stage {
  width: 100%;
  overflow: visible;
  touch-action: pan-y;
}
.energy-svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 280px;
}
.energy-svg .pillar { cursor: pointer; }
.energy-svg .pillar-hit { fill: transparent; }
.energy-svg .pillar-body { transition: opacity 0.2s ease; }
.energy-svg .pillar-name,
.energy-svg .pillar-age,
.energy-svg .pillar-year {
  text-anchor: middle;
  font-size: 11px;
  fill: #3a4a43;
  pointer-events: none;
}
.energy-svg .pillar-name { font-weight: 700; font-size: 12px; }
.energy-svg .pillar-year { fill: #8a968f; font-size: 10px; }
.energy-svg .pillar.tide-high .pillar-body { fill: #3f6f5c; }
.energy-svg .pillar.tide-up .pillar-body { fill: #6e947f; }
.energy-svg .pillar.tide-flat .pillar-body { fill: #a8b7ae; }
.energy-svg .pillar.tide-low .pillar-body { fill: #c5cdc8; }
.energy-svg .pillar.tide-now .pillar-body,
.energy-svg .pillar.is-current .pillar-body {
  fill: #c9a24a;
}
.energy-svg .pillar-glow { fill: rgba(201,162,74,0.18); }
.energy-svg .pillar:not(.is-current) .pillar-glow { fill: transparent; }
.energy-svg .pillar.is-selected .pillar-body {
  stroke: #12201b;
  stroke-width: 1.5;
  filter: brightness(1.08);
}
.energy-svg .pillar.is-selected .pillar-name { fill: #1a2823; font-weight: 800; }
.energy-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-top: 0.35rem;
  padding: 0 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.energy-legend .dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  margin-right: 0.3rem;
  vertical-align: middle;
}
.energy-legend .tide-high { background: #3f6f5c; }
.energy-legend .tide-up { background: #6e947f; }
.energy-legend .tide-flat { background: #a8b7ae; }
.energy-legend .tide-low { background: #c5cdc8; }
.energy-legend .tide-now { background: #c9a24a; }

.dayun-detail { margin: 0.75rem 0.35rem 0.2rem; }
.dayun-detail-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  animation: rise 0.35s ease both;
}
.dayun-detail-card .eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}
.dayun-detail-card h4 {
  margin: 0.2rem 0;
  font-family: var(--display);
  font-size: 1.15rem;
}
.dayun-detail-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.dayun-meter {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    conic-gradient(#c9a24a var(--v, 50%), rgba(23,36,31,0.08) 0);
  flex-shrink: 0;
}
.dayun-meter span {
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: #fff;
}
.dayun-meter em {
  position: relative;
  z-index: 1;
  font-style: normal;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
}

.chapter-rail {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.85rem;
  margin-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  touch-action: pan-x;
}
.chapter-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.84rem;
  cursor: pointer;
  scroll-snap-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chapter-chip:hover { color: var(--ink); border-color: rgba(63,111,92,0.35); }
.chapter-chip.active {
  color: #12201b;
  background: var(--gold);
  border-color: transparent;
  font-weight: 600;
}
.chapter-stack { display: grid; gap: 0.75rem; }
.chapter-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.chapter-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.95rem 1.05rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
}
.chapter-toggle:hover { background: rgba(63,111,92,0.04); }
.chapter-index {
  font-family: var(--display);
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.chapter-title {
  font-family: var(--display);
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}
.chapter-chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -0.2rem;
}
.chapter-card.open .chapter-chevron {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}
.chapter-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}
.chapter-card.open .chapter-panel { grid-template-rows: 1fr; }
.chapter-body {
  overflow: hidden;
  padding: 0 1.05rem;
}
.chapter-card.open .chapter-body {
  padding: 0 1.05rem 1.1rem;
  border-top: 1px solid rgba(23,36,31,0.06);
}

.history-list { display: grid; gap: 0.85rem; }
.history-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0.2rem;
  border-bottom: 1px solid var(--line);
}
.history-item:last-child { border-bottom: 0; }
.history-item h3 {
  margin: 0.2rem 0;
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}
.history-item h3 a { color: inherit; }
.history-item .sub { margin: 0; color: var(--muted); font-size: 0.9rem; }
.history-actions { display: flex; gap: 0.55rem; flex-shrink: 0; }
.empty-hint { margin: 0.5rem 0; color: var(--muted); line-height: 1.7; }

/* 个人中心 / 工作台 */
.account-body .app-main { display: none; }
.account-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.25rem auto 3rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: start;
}
.account-side {
  position: sticky;
  top: 4.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 0.85rem;
  box-shadow: 0 12px 28px rgba(16,24,22,0.04);
}
.side-label {
  margin: 0.75rem 0.55rem 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}
.side-label:first-child { margin-top: 0.15rem; }
.side-link {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.92rem;
}
.side-link:hover { background: rgba(63,111,92,0.08); }
.side-link.active {
  background: rgba(63,111,92,0.12);
  color: var(--jade);
  font-weight: 600;
}
.account-main { min-width: 0; display: grid; gap: 1rem; }
.profile-banner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 168px;
  background:
    linear-gradient(100deg, rgba(10,16,14,0.72), rgba(10,16,14,0.35)),
    url("/static/assets/section-mist.jpg") center / cover no-repeat;
  color: #fff;
}
.profile-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,12,10,0.55), transparent 70%);
  pointer-events: none;
}
.profile-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.4rem 1.4rem;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.profile-avatar img { width: 42px; height: 42px; }
.profile-meta { flex: 1; min-width: 180px; }
.profile-meta h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: 0.08em;
}
.profile-meta p { margin: 0.25rem 0 0; color: rgba(247,250,248,0.82); font-size: 0.92rem; }
.profile-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  font-size: 0.82rem !important;
  color: rgba(247,250,248,0.66) !important;
}
.workbench-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.wb-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1rem;
  box-shadow: 0 10px 24px rgba(16,24,22,0.04);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.wb-card:hover {
  transform: translateY(-2px);
  border-color: rgba(63,111,92,0.35);
}
.wb-label { margin: 0; color: var(--muted); font-size: 0.86rem; }
.wb-value {
  margin: 0.55rem 0 0;
  font-family: var(--display);
  font-size: 2rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.wb-value.wb-text { font-size: 1.35rem; color: var(--jade); }
.account-panel .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.account-panel .panel-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}
.account-panel .panel-head p,
.account-panel .panel-head a {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.shortcut-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.shortcut-item:hover { border-color: rgba(63,111,92,0.35); background: #f7faf8; }
.shortcut-item strong { color: var(--ink); font-size: 0.98rem; }
.shortcut-item span { color: var(--muted); font-size: 0.82rem; }
.medal-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.medal {
  text-align: center;
  padding: 1rem 0.7rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.medal.off { opacity: 0.45; filter: grayscale(0.4); }
.medal-seal {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: #12201b;
  background: radial-gradient(circle at 30% 30%, #e0c789, #c9a24a 65%, #8d7130);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
}
.medal.off .medal-seal {
  background: #d5dbd7;
  color: #6a756f;
  box-shadow: none;
}
.medal h3 {
  margin: 0;
  font-size: 0.95rem;
  font-family: var(--display);
}
.medal p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-art { min-height: 240px; }
  .feature-grid, .score-row, .cast-box, .grid, .footer-grid, .jianpi-grid, .jianpi-remedy { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .showcase-panel, .showcase-panel.alt { justify-content: flex-start; }
  .ask-form { flex-direction: column; border-radius: 18px; padding: 0.8rem; }
  .ask-form .btn-solid { width: 100%; }
  .account-shell { grid-template-columns: 1fr; }
  .account-side { position: static; display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .side-label { width: 100%; }
  .workbench-grid, .shortcut-grid, .medal-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .feature-grid, .score-row, .cast-box, .grid, .footer-grid, .jianpi-grid, .jianpi-remedy { grid-template-columns: 1fr; }
  .feature-card.wide { grid-column: auto; }
  .hero h1 { letter-spacing: 0.2em; text-indent: 0.2em; }
  .workbench-grid, .shortcut-grid, .medal-row { grid-template-columns: 1fr; }
}
