:root {
  --bg: #fbf6ec;          /* rice paper */
  --surface: #ffffff;
  --ink: #1f1c18;
  --muted: #6b6258;
  --line: #e8dfcf;
  --jade: #0f5a47;
  --jade-dark: #093d31;
  --jade-soft: #e3efe9;
  --cinnabar: #b8322a;    /* seal red */
  --cinnabar-dark: #8f231d;
  --gold: #b88a2e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(40, 30, 10, 0.08);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --han: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  /* The five elements, readable on white (text) and as fills */
  --wood: #2f7d4f; --fire: #c2412d; --earth: #a8742b; --metal: #6e7680; --water: #245b8f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.65 var(--sans); }
img, svg { max-width: 100%; }
a { color: var(--jade); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.18; color: var(--jade-dark); }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 0.2em 0 0.35em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2rem); margin: 1.5em 0 0.5em; }
h3 { font-size: 1.22rem; margin: 1.3em 0 0.3em; }
main { padding: 0 16px 48px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.lead { font-size: 1.18rem; color: var(--ink); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; color: var(--cinnabar); margin: 0; }
.han { font-family: var(--han); font-weight: 700; }
.center { text-align: center; }

.site-header { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 14px 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--jade-dark); font-family: var(--serif); font-size: 1.28rem; font-weight: 700; }
.logo { width: 32px; height: 32px; }
.site-header nav a { text-decoration: none; font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 16px 40px; color: var(--muted); font-size: 0.85rem; }
.site-footer > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.site-footer nav a { color: var(--muted); }
.cb-disclaimer { font-size: 0.78rem; }
.support-lines { line-height: 1.8; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.narrow { max-width: 680px; margin: 24px auto; }
.prose { max-width: 700px; margin-left: auto; margin-right: auto; }
.stack { display: grid; gap: 14px; }
.notice { background: var(--jade-soft); border-radius: 10px; padding: 12px 14px; }
.error { background: #fbeaea; color: #8a2d26; border-radius: 10px; padding: 10px 14px; }

.btn { display: inline-block; background: var(--cinnabar); color: #fff; border: 0; border-radius: 999px; padding: 13px 24px; font: 700 1.02rem var(--sans); text-decoration: none; cursor: pointer; text-align: center; box-shadow: 0 6px 16px rgba(184, 50, 42, 0.25); }
.btn:hover { background: var(--cinnabar-dark); }
.btn-large { font-size: 1.15rem; padding: 17px 28px; width: 100%; }
.btn-secondary { background: transparent; color: var(--jade); border: 1.5px solid var(--jade); box-shadow: none; }
.btn-secondary:hover { background: var(--jade-soft); }
.btn-small { padding: 8px 14px; font-size: 0.9rem; }

label { display: grid; gap: 6px; font-weight: 600; font-size: 0.97rem; }
input[type=text], input[type=email], input[type=date], input[type=time], input:not([type]), select {
  font: inherit; padding: 12px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; min-height: 50px; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.hint { font-size: 0.85rem; color: var(--muted); margin: -4px 0 0; font-weight: 400; }
.row { display: flex; gap: 12px; align-items: end; }
.grow { flex: 1; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; white-space: nowrap; padding-bottom: 14px; }

/* Seal stamp: the animal's character in a red seal */
.seal { display: inline-grid; place-items: center; width: 120px; height: 120px; background: var(--cinnabar); color: #fff; border-radius: 16px; font: 700 76px/1 var(--han); box-shadow: inset 0 0 0 5px rgba(255,255,255,0.18), var(--shadow); transform: rotate(-3deg); }
.seal.small { width: 64px; height: 64px; font-size: 40px; border-radius: 10px; }

/* Landing */
.hero { max-width: 1080px; margin: 12px auto 0; display: grid; gap: 26px; }
.hero .ticks { padding: 0; list-style: none; display: grid; gap: 8px; }
.hero .ticks li::before { content: '◆'; color: var(--cinnabar); margin-right: 10px; font-size: 0.8em; }
.countdown-line { display: inline-block; background: var(--jade-dark); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; font-weight: 600; }
.quiz { display: grid; gap: 16px; position: relative; }
.quiz h2 { margin: 0; }
.quiz-progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; width: 25%; background: var(--cinnabar); transition: width 0.3s; }
.quiz-step[hidden] { display: none; }
.quiz .step-title { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--jade-dark); margin: 0; }
.quiz .nav { display: flex; gap: 10px; }
.quiz .nav .btn { flex: 1; }
.guess-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.guess-grid label { display: grid; place-items: center; gap: 0; padding: 8px 4px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 0.85rem; background: #fff; }
.guess-grid label .han { font-size: 1.5rem; color: var(--cinnabar); }
.guess-grid input { position: absolute; opacity: 0; pointer-events: none; }
.guess-grid label:has(input:checked) { border-color: var(--cinnabar); background: #fdf1ef; }
.choices, .hour-grid { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice, .hour-grid label { display: flex; gap: 10px; align-items: center; font-weight: 600; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.choice:has(input:checked), .hour-grid label:has(input:checked) { border-color: var(--cinnabar); background: #fdf1ef; }
.choice input, .hour-grid input { accent-color: var(--cinnabar); }
.hour-grid { grid-template-columns: repeat(2, 1fr); }
.hour-grid label { padding: 10px 12px; font-size: 0.92rem; }
.hour-grid label.wide { grid-column: 1 / -1; justify-content: center; }
details summary { cursor: pointer; color: var(--jade); font-weight: 600; }
.casting { text-align: center; padding: 18px 4px; }
.casting ul { list-style: none; padding: 0; display: grid; gap: 8px; color: var(--muted); }
.casting li { animation: fade-in 0.4s both; }
.casting li:nth-child(2) { animation-delay: 0.35s; } .casting li:nth-child(3) { animation-delay: 0.7s; } .casting li:nth-child(4) { animation-delay: 1.05s; }
.casting li::before { content: '◆ '; color: var(--cinnabar); }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hero-ticks { max-width: 1080px; }
@media (min-width: 900px) { .hero-ticks { grid-column: 1; } }
.place { position: relative; }
.suggestions { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.suggestions li { padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 400; }
.suggestions li:hover, .suggestions li[aria-selected=true] { background: var(--jade-soft); }
.band { max-width: 1080px; margin: 44px auto 0; }
.animal-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.animal-strip a { display: grid; place-items: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; font-weight: 600; font-size: 0.9rem; }
.animal-strip a .han { font-size: 1.7rem; color: var(--cinnabar); }
.types-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.types-grid div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.types-grid h3 { margin-top: 0; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 1fr; align-items: start; margin-top: 30px; }
  .hero-copy { padding-top: 18px; }
}

/* Reveal (the free preview, our sales page) */
.preview, .report { max-width: 900px; margin: 0 auto; }
.reveal { text-align: center; max-width: 720px; margin: 22px auto 6px; }
.reveal .seal { margin: 8px auto 14px; }
.wrong-animal { max-width: 720px; margin: 18px auto; border-left: 5px solid var(--cinnabar); background: #fff; border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); }
.wrong-animal strong { color: var(--cinnabar-dark); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 560px; margin: 10px auto; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; text-align: center; }
.pillar.day { border: 2px solid var(--cinnabar); }
.pillar h4 { margin: 0 0 6px; font: 700 0.72rem var(--sans); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.pillar .glyph { display: block; font: 700 2rem/1.15 var(--han); }
.pillar .label { display: block; font-size: 0.72rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.pillar .unknown { display: block; font-size: 0.75rem; color: var(--muted); padding: 18px 2px; }
.el-wood { color: var(--wood); } .el-fire { color: var(--fire); } .el-earth { color: var(--earth); } .el-metal { color: var(--metal); } .el-water { color: var(--water); }
.bars { display: grid; gap: 8px; max-width: 560px; margin: 14px auto; }
.bar { display: grid; grid-template-columns: 70px 1fr 42px; gap: 10px; align-items: center; font-weight: 600; font-size: 0.92rem; }
.bar .track { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 99px; }
.fill.wood { background: var(--wood); } .fill.fire { background: var(--fire); } .fill.earth { background: var(--earth); } .fill.metal { background: var(--metal); } .fill.water { background: var(--water); }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.month .m-name { font-weight: 700; }
.month .m-dates { font-size: 0.8rem; color: var(--muted); }
.month .tone { display: inline-block; margin-top: 6px; font-size: 0.78rem; font-weight: 700; border-radius: 99px; padding: 2px 10px; }
.tone.supportive { background: #e2f1e7; color: #1f6b3f; } .tone.mixed { background: #f6efdc; color: #7a5a14; } .tone.challenging { background: #f9e4e1; color: #8f231d; }
.month.locked { position: relative; overflow: hidden; }
.month.locked .tone { filter: blur(5px); user-select: none; }
.month.locked::after { content: '🔒'; position: absolute; right: 10px; top: 8px; font-size: 0.9rem; }
.keys { display: grid; gap: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.keys > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.keys > div:last-child { border-bottom: 0; }
.keys dt { font-weight: 700; color: var(--muted); font-size: 0.9rem; }
.keys dd { margin: 0; }

.offer { max-width: 540px; margin: 32px auto; text-align: center; border: 2px solid var(--gold); }
.price { font-size: 1rem; color: var(--muted); margin: 6px 0 14px; }
.price span { font-family: var(--serif); font-size: 2.6rem; color: var(--jade-dark); margin-right: 6px; }
.inside { padding-left: 1.1em; display: grid; gap: 8px; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; padding: 0; list-style: none; }
.trust li::before { content: '✓ '; color: var(--jade); font-weight: 700; }
.faq h3 { font-family: var(--sans); font-size: 1.04rem; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(9, 61, 49, 0.97); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; justify-content: center; transform: translateY(110%); transition: transform 0.25s; }
.sticky-cta.show { transform: none; }
.sticky-cta .txt { color: #fff; font-weight: 600; font-size: 0.95rem; }
.sticky-cta .btn { padding: 11px 18px; white-space: nowrap; }
@media (min-width: 760px) { .sticky-cta { display: none; } }

/* Readings */
.report-cover { text-align: center; padding: 30px 0 8px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 22px 14px; max-width: 700px; margin: 12px auto; }
.toc h2 { font-size: 1.2rem; }
.report-section { max-width: 700px; margin: 0 auto; }
.report-section > h2 { border-top: 1px solid var(--line); padding-top: 1.2em; }
.block { margin: 18px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--line); }
.block.key { border-left-color: var(--cinnabar); }
.upsell { max-width: 700px; margin: 32px auto; border: 2px solid var(--gold); }
.upsell h2 { margin-top: 0; }
.reading-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.reading-list h2 { margin: 0; font-size: 1.3rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.calendar { width: 100%; border-collapse: collapse; margin: 10px 0 24px; font-size: 0.92rem; }
.calendar th, .calendar td { border: 1px solid var(--line); padding: 6px 4px; text-align: center; vertical-align: top; }
.calendar td.favorable { background: #e2f1e7; } .calendar td.supportive { background: #f0f7f2; } .calendar td.careful { background: #fbf3e2; } .calendar td.clash { background: #f9e4e1; }
.calendar .d { font-weight: 700; }
.calendar .p { display: block; font: 0.72rem var(--han); color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.85rem; }
.legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--line); }
.legend .favorable::before { background: #bfe0c9; } .legend .supportive::before { background: #dcece0; } .legend .careful::before { background: #f1dfb7; } .legend .clash::before { background: #efc3bd; }
.home-offer { max-width: 1080px; margin: 48px auto 0; border-top: 1px solid var(--line); padding-top: 8px; }
.also { text-align: center; }

@media print {
  body { background: #fff; font-size: 11.5pt; }
  .site-header nav, .site-footer nav, .no-print, .sticky-cta { display: none !important; }
  .report-section > h2 { page-break-before: always; border: 0; }
  .block, .month, .pillar { page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .card, .keys, .toc { box-shadow: none; }
}

/* Monthly Almanac and 2027 Almanac Calendar (almanac.ts, calendar.ts) */
.almanac-month .tone { border-radius: var(--radius); padding: 12px 16px; background: var(--jade-soft); color: var(--ink); }
.almanac-month .tone-challenging { background: #f9e4e1; }
.almanac-month .tone-mixed { background: #fbf3e2; }
.day-list { padding-left: 1.1em; display: grid; gap: 4px; }
.cal-key, .cal-month { max-width: 760px; margin: 0 auto; }
.cal-legend { list-style: none; padding: 0; margin: 8px 0; }
.cal-legend b { display: inline-block; min-width: 1em; text-align: center; }
.kind-notes { padding-left: 1.1em; display: grid; gap: 6px; font-size: 0.95rem; }
.calendar { table-layout: fixed; color: var(--ink); }
.calendar td { height: 64px; position: relative; }
.calendar td.blank { background: transparent; border-color: transparent; }
.calendar td .k { position: absolute; top: 3px; right: 5px; font-size: 0.8rem; }
.calendar td .p { position: absolute; bottom: 3px; left: 0; right: 0; }
.calendar td.jie { outline: 2px solid var(--jade); outline-offset: -2px; }
.calendar td .jie-tag { display: block; position: absolute; top: 24px; left: 0; right: 0; font-size: 0.6rem; line-height: 1.1; color: var(--jade-dark); font-weight: 600; }
.cal-summary { margin-top: -14px; }
.product-page .cal-month { max-width: none; }
.product-page .calendar td { height: 52px; }
@media (max-width: 520px) {
  .calendar td { height: 54px; }
  .calendar td .jie-tag { font-size: 0.5rem; top: 22px; }
}
@media print {
  @page { margin: 12mm; }
  .calendar-body .cal-month { page-break-after: always; max-width: none; }
  .calendar-body .cal-month h2 { page-break-before: avoid; margin-top: 0; }
  .calendar td { height: 26mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .calendar-body .report-cover, .calendar-body .cal-key { page-break-after: always; }
}

/* ===== Upsell flow and compatibility (routes/upsell.ts, routes/compat.ts) ===== */
.offer-flow .offer-box { margin: 22px 0; text-align: center; }
.offer-flow .price { margin-top: 0; }
.choice-buttons { display: grid; gap: 12px; margin-top: 14px; }
.choice-buttons .btn { text-align: center; width: 100%; }
.btn[aria-disabled=true] { background: #b9b3a9; color: #fff; cursor: not-allowed; }
.btn[aria-disabled=true]:hover { background: #b9b3a9; }
.terms-check { display: flex; gap: 10px; align-items: flex-start; white-space: normal; padding-bottom: 8px; text-align: left; }
.terms-check input { margin-top: 5px; accent-color: var(--cinnabar); }
.offer-box .terms { text-align: left; }
.partner-peek h2 { margin: 0; font-size: 1.3rem; }
.peek-result { background: var(--jade-soft); border-radius: 10px; padding: 12px 14px; }
.peek-result p { margin: 0 0 6px; }
.compat-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-align: center; }
.compat-pair > div:not(.compat-score) { display: grid; gap: 4px; justify-items: center; font-size: 0.9rem; }
.compat-score { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; border: 4px solid var(--cinnabar); background: var(--surface); }
.compat-score span { font: 700 2rem/1 var(--serif); color: var(--cinnabar-dark); }
.compat-score small { font-size: 0.68rem; color: var(--muted); margin-top: -18px; }
.compat-parts { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.compat-parts li { display: grid; grid-template-columns: 110px 1fr 62px; gap: 4px 10px; align-items: center; }
.compat-parts .track { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.compat-parts .fill { display: block; height: 100%; background: var(--jade); border-radius: 99px; }
.compat-parts .pts { text-align: right; font-weight: 700; }
.compat-parts .note { grid-column: 1 / -1; font-size: 0.84rem; color: var(--muted); }
.partners { display: grid; gap: 22px; max-width: 760px; margin: 0 auto 24px; }
.partner-form { max-width: 520px; margin: 0 auto 24px; }
.partner h4, .compat-sample h4 { margin: 1.2em 0 0.2em; font-family: var(--serif); color: var(--jade-dark); }
@media (max-width: 480px) { .compat-pair { grid-template-columns: 1fr; } .compat-score { margin: 0 auto; } .compat-parts li { grid-template-columns: 90px 1fr 56px; } }

/* ---- Content pages: animal pages, zodiac index, advertorial (views/content-pages.ts) ---- */
.animal-page h1 .han { display: inline-block; color: var(--cinnabar); margin-right: 8px; }
.advert { padding: 8px 0 32px; }
.advert .ad-label { display: inline-block; margin: 0 0 14px; padding: 3px 10px; border: 1.5px solid var(--muted); border-radius: 4px; color: var(--ink); background: var(--surface); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.advert .byline { color: var(--muted); font-size: 0.9rem; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.advert-cta { margin: 32px 0 18px; text-align: center; border: 2px solid var(--gold); }
.advert-cta h2 { margin-top: 0; }