/* Hansen · Chinese Astrology (English edition) — rice paper, ink, cinnabar */
:root {
  --paper: #f3ede1; --paper-2: #ebe2d0; --card: #fbf8f1; --ink: #1f1b16; --ink-2: #4a4238; --muted: #857967;
  --line: #d9ccb4; --line-soft: #e7dcc8; --red: #a8322b; --red-deep: #7c231e; --gold: #9c7a43; --night: #17140f;
  --Wood: #4b7a58; --Fire: #b5443a; --Earth: #a27a3c; --Metal: #8f8059; --Water: #34557a;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cjk: "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; }
a { color: var(--red); }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }
.center { text-align: center; }
.cjk { font-family: var(--cjk); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; letter-spacing: .01em; }
h2 { font-size: 30px; }
h3 { font-size: 22px; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; max-width: 1040px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.seal { display: inline-grid; place-items: center; width: 34px; height: 34px; background: var(--red); color: #fbeee4; border-radius: 6px; font-family: var(--cjk); font-size: 13px; line-height: 1; letter-spacing: 0; writing-mode: vertical-rl; }
.brand-name { font-family: var(--display); font-size: 21px; font-weight: 600; }
.brand-name small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-top: -2px; }
.toplinks { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.toplinks a { color: var(--ink-2); text-decoration: none; }
.pill { background: rgba(251,247,238,.75); border: 1px solid var(--line-soft); padding: 3px 10px; border-radius: 999px; }

/* Hero */
body.home::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: #efe3cb url(/img/bg-shanshui.jpg) center top / cover no-repeat;
  background-image: image-set(url(/img/bg-shanshui.webp) type("image/webp"), url(/img/bg-shanshui.jpg) type("image/jpeg")); }
body.home::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(243,235,220,0) 0%, rgba(243,235,220,.35) 45%, rgba(243,235,220,.8) 100%); }
.hero { padding: 64px 16px 40px; text-align: center; max-width: 720px; margin: 0 auto; }
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--red-deep); font-weight: 600; }
.hero h1 { font-size: clamp(44px, 9vw, 72px); margin: 12px 0 14px; text-shadow: 0 0 18px rgba(250,243,229,.9); }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 540px; margin: 0 auto 26px; text-shadow: 0 0 12px rgba(250,243,229,.95); }
.hero .note { margin-top: 12px; font-size: 14px; color: var(--ink-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--red); color: #fff7ef; border: 0; border-radius: 8px; padding: 14px 26px; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; box-shadow: 0 6px 18px rgba(124,35,30,.22); transition: transform .15s, background .15s; }
.btn:hover { background: var(--red-deep); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: transparent; color: var(--red); border: 1px solid var(--red); box-shadow: none; }

.card { background: rgba(251,248,241,.96); border: 1px solid var(--line-soft); border-radius: 12px; padding: 24px 20px; box-shadow: 0 10px 30px rgba(60,45,25,.06); margin: 18px 0; }
section.block { padding: 28px 0; }

/* Why cards */
.why { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .why { grid-template-columns: repeat(3, 1fr); } }
.why .card { margin: 0; padding: 18px; }
.why h3 { font-size: 20px; }
.why p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* Form */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=email], input[type=date], input[type=time], select {
  width: 100%; padding: 12px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; min-height: 48px; }
input:focus, select:focus { outline: 2px solid rgba(168,50,43,.25); border-color: var(--red); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 11px; cursor: pointer; background: #fffdf8; margin: 0; font-weight: 500; }
.seg input:checked + label { background: var(--red); color: #fff7ef; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 400; }
.check input { margin-top: 4px; accent-color: var(--red); }
.err { color: var(--red-deep); font-size: 14px; min-height: 20px; margin: 8px 0; }
.place { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fffdf8; border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; max-height: 260px; overflow: auto; box-shadow: 0 12px 30px rgba(40,30,15,.12); }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.suggest button:hover, .suggest button.on { background: #f5ecdc; }
.suggest small { color: var(--muted); }
.chosen { font-size: 13px; color: var(--Wood); margin-top: 5px; }

/* Profile result */
.profile-head { display: flex; gap: 16px; align-items: center; }
.glyph { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 12px; display: grid; place-items: center; font-family: var(--cjk); font-size: 50px; color: #fff8ee; }
.profile-head h2 { font-size: 34px; margin: 0; }
.profile-head .sub { color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.tag { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.wxbar { display: grid; grid-template-columns: 58px 1fr 48px; align-items: center; gap: 10px; margin: 7px 0; font-size: 14px; }
.wxbar .track { height: 10px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.wxbar .fill { height: 100%; border-radius: 99px; transition: width .9s ease; }
.wxbar .v { text-align: right; color: var(--muted); }
table.pillars { width: 100%; border-collapse: collapse; text-align: center; font-size: 13px; }
table.pillars th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 6px 2px; }
table.pillars td { padding: 6px 2px; border-top: 1px solid var(--line-soft); vertical-align: top; }
table.pillars .big { font-family: var(--cjk); font-size: 30px; line-height: 1.1; display: block; }
table.pillars .py { font-size: 12px; color: var(--ink-2); }
table.pillars .god { font-size: 12px; color: var(--red-deep); font-weight: 600; }
.stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #d8ccb6; }
.locked { position: relative; }
.locked li { filter: blur(0); }
.lock-list { list-style: none; padding: 0; margin: 0; }
.lock-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 12px; }
.lock-list li span:last-child { color: var(--muted); white-space: nowrap; }
.blur { filter: blur(5px); user-select: none; }
.paybox { text-align: center; }
.price-big { font-family: var(--display); font-size: 44px; font-weight: 700; color: var(--red-deep); line-height: 1; }
.inside { columns: 2; column-gap: 20px; padding-left: 18px; margin: 12px 0 0; font-size: 14.5px; }
@media (max-width: 480px) { .inside { columns: 1; } }
.past { display: grid; gap: 10px; }
.past .yr { display: flex; justify-content: space-between; align-items: baseline; }
.trust { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 12px; }

/* FAQ / footer */
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--ink-2); }
footer { padding: 30px 16px 50px; text-align: center; font-size: 13px; color: var(--muted); }
footer a { color: var(--ink-2); margin: 0 6px; }
.disclaimer { max-width: 560px; margin: 10px auto 0; }

.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--night); color: #f7efe2; padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0; transition: .25s; z-index: 99; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.legal h1 { font-size: 40px; margin-top: 20px; }
.legal h2 { font-size: 24px; margin-top: 28px; }
.legal p, .legal li { color: var(--ink-2); }
