@font-face {
  font-family: "Almanac Serif";
  src: url("almanac-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #251d17;
  --muted: #625348;
  --red: #a63528;
  --red-dark: #85251a;
  --paper: #fcf8ef;
  --cream: #f5ebdc;
  --line: #e0d1bd;
  --serif: Georgia, "Almanac Serif", "Songti SC", SimSun, "Noto Serif CJK SC", serif;
  --sans: system-ui, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.75 var(--sans); }
a { color: inherit; text-underline-offset: .26em; }
a:hover { color: var(--red-dark); }
img { display: block; max-width: 100%; height: auto; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.28; }
ul { padding-inline-start: 1.25em; }
.wrap { width: min(100% - 88px, 1248px); margin-inline: auto; }
.skip { position: absolute; z-index: 2; top: 0; left: 0; padding: .6rem 1rem; background: white; transform: translateY(-120%); }
.skip:focus { transform: none; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 40px; border-radius: 3px; background: var(--red); color: #fff8ed; font: 700 24px/1 var(--serif); box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 4px #e8ab9a; }
.brand-name { font: 700 25px/1.1 var(--serif); letter-spacing: .015em; }
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 44px); color: #493b30; font-size: 14px; white-space: nowrap; }
.nav a { text-decoration: none; padding: 10px 1px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--red-dark); text-decoration: underline; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--red); background: var(--red); color: #fff9ef; border-radius: 4px; padding: 10px 17px; text-decoration: none; white-space: nowrap; font-weight: 650; line-height: 1.25; }
.button:hover { color: white; background: var(--red-dark); border-color: var(--red-dark); }
.button-outline { color: var(--red-dark); background: transparent; }
.header-find { font-size: 13px; min-height: 39px; }
.eyebrow { color: var(--red-dark); font-size: 13px; font-weight: 700; letter-spacing: .13em; }
.eyebrow-line { display: flex; align-items: center; gap: 11px; }
.eyebrow-line::before { content: ""; width: 24px; height: 1px; background: var(--red); }
.hero { background: var(--cream); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.01fr 1fr; align-items: center; gap: clamp(26px, 5vw, 78px); padding-block: clamp(32px, 4vw, 60px); }
.hero h1 { font-size: clamp(48px, 5.65vw, 82px); letter-spacing: -.04em; line-height: 1.12; margin: 11px 0 17px; }
.lead { color: var(--muted); font-size: clamp(15px, 1.35vw, 18px); line-height: 1.85; max-width: 35em; }
.hero .lead { max-width: 26em; }
.hero-figure { position: relative; isolation: isolate; overflow: hidden; background: #ead3b3; border-radius: 3px; }
.hero-figure img { width: 100%; aspect-ratio: 1.4; object-fit: cover; }
.hero-figure figcaption { position: absolute; inset: auto 13px 13px auto; padding: 7px 12px; color: #fff9ec; background: rgba(44, 30, 22, .94); border-radius: 2px; text-align: left; font-size: 12px; letter-spacing: .04em; }
.hero-figure figcaption strong { display: block; font-family: var(--serif); font-size: 17px; }
.hero-figure a { display: block; color: inherit; text-decoration: none; }
.hero-figure a:hover { text-decoration: underline; }
.calc { margin-top: 25px; background: #fffbf3; border: 1px solid #ddcbb3; border-radius: 6px; padding: 16px 17px 12px; box-shadow: 0 3px 12px #67350109; }
.calc h2 { font-size: 21px; margin-bottom: 7px; }
.calc-fields { display: grid; grid-template-columns: 1.35fr 1fr 1fr auto; gap: 7px; align-items: end; }
.field { min-width: 0; }
.field label { display: block; font-size: 12px; color: #574639; font-weight: 650; }
.field select, .field input { width: 100%; min-height: 40px; background: #fffdf7; color: var(--ink); border: 1px solid #cbb9a2; border-radius: 4px; padding: 5px 8px; }
.calc-fields .button { min-height: 40px; padding-inline: 13px; font-size: 13px; }
.form-note { color: var(--muted); margin-top: 8px; font-size: 12px; }
.result { margin-top: 10px; padding: 8px 10px; color: var(--ink); background: #f5eadb; border-left: 3px solid var(--red); font-size: 14px; }
.result:empty { display: none; }
.result a { color: var(--red-dark); font-weight: 700; }
.section { padding-block: 58px; }
.section-title { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 23px; }
.section-title h2 { font-size: clamp(31px, 3.1vw, 46px); }
.section-title p:not(.eyebrow) { color: var(--muted); margin-top: 7px; }
.text-link { display: inline-flex; gap: 9px; align-items: baseline; color: var(--red-dark); font-weight: 700; font-size: 14px; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.section-title .text-link { white-space: nowrap; }
.animal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.animal-card { position: relative; display: grid; text-decoration: none; background: #faf0e0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: transform .18s ease, border-color .18s ease; }
.animal-card:hover { transform: translateY(-3px); border-color: #b27564; }
.animal-art { background: #f7ecdc; height: clamp(125px, 14vw, 180px); display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; overflow: hidden; }
.animal-art img { width: auto; height: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card-branch { position: absolute; top: 10px; left: 12px; color: #794c3f; font: 700 14px/1.5 var(--serif); border: 1px solid #d6b5a5; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; }
.card-info { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; background: #fffaf1; padding: 12px 15px; border-top: 1px solid #ebdfce; }
.card-name { display: block; font: 700 25px/1.12 var(--serif); }
.card-info small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.card-arrow { color: var(--red-dark); font-size: 17px; }
.zodiac-explainer { border-top: 1px solid var(--line); padding-block: clamp(26px, 4vw, 54px); }
.zodiac-explainer h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 12px; }
.zodiac-explainer p { color: var(--muted); max-width: 70ch; }
.zodiac-explainer p + p { margin-top: 10px; }
.zodiac-explainer a { color: var(--red-dark); }
.guide-band { background: #f2e7d6; border-block: 1px solid var(--line); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.guide-card { display: grid; align-content: start; gap: 7px; background: #fffaf1; border: 1px solid var(--line); border-radius: 4px; padding: 21px; min-height: 130px; text-decoration: none; }
.guide-card:hover { border-color: #b27564; }
.guide-card h2, .guide-card h3 { display: flex; justify-content: space-between; gap: 12px; font-size: 22px; }
.guide-card p { color: var(--muted); font-size: 14px; }
.hero-year-link { margin-top: 12px; }
.zodiac-years { padding-bottom: 0; }
.year-editions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.year-edition { padding: clamp(16px, 3vw, 28px); background: #fffaf1; border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: 5px; }
.year-edition-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.year-edition-head img { width: 74px; flex-shrink: 0; mix-blend-mode: multiply; }
.year-edition h3 { font-size: clamp(24px, 2.6vw, 34px); margin-top: 4px; }
.year-edition-dates { margin-bottom: 10px; font-weight: 650; }
.year-edition-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; }
.year-edition-source { color: var(--muted); font-size: 13px; margin-top: 10px; }
.pairing-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 8px; margin: 12px 0; }
.pairing-summary div { background: #f3e8d8; border: 1px solid var(--line); border-radius: 4px; padding: 9px 11px; }
.pairing-summary dt { font-weight: 700; }
.pairing-summary dd { margin: 0; }
.forecast-links li + li { margin-top: 7px; }
.site-footer { background: #2e251e; color: #f7ead7; padding: 30px 0; font-size: 13px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 15px 24px; flex-wrap: wrap; }
.site-footer p { color: #efdeca; }
.site-footer a:hover { color: white; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); margin-bottom: 16px; font-size: 13px; }
.crumbs a { color: var(--red-dark); }
.page-hero { background: var(--cream); border-bottom: 1px solid var(--line); padding: 36px 0 42px; }
.page-hero h1 { font-size: clamp(40px, 5vw, 70px); margin-bottom: 12px; }
.page-hero .lead { max-width: 42em; }
.profile-head { display: grid; grid-template-columns: 1.5fr 1fr; align-items: center; gap: 24px; }
.profile-head img { width: min(100%, 310px); justify-self: center; max-height: 235px; object-fit: contain; mix-blend-mode: multiply; }
.profile-subtitle { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--red-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.chip { font-size: 13px; border: 1px solid #d7c3aa; padding: 3px 10px; border-radius: 50px; background: #fff8ee; }
.article-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 42px; padding-block: 38px 62px; }
.article-side { align-self: start; position: sticky; top: 20px; color: var(--muted); font-size: 14px; }
.article-side nav { border-left: 1px solid var(--line); padding-left: 13px; margin-top: 7px; }
.article-side a { display: block; text-decoration: none; padding: 3px 0; }
.article-side a:hover { text-decoration: underline; }
.article { min-width: 0; }
.article section + section { margin-top: 31px; padding-top: 26px; border-top: 1px solid var(--line); }
.article h2 { margin-bottom: 10px; font-size: clamp(25px, 3vw, 34px); }
.article h3 { margin: 18px 0 5px; font-size: 20px; }
.article p + p { margin-top: 8px; }
.animal-article p { max-width: 74ch; }
.article a:not(.button, .guide-card) { color: var(--red-dark); }
.article ul { margin-block: 8px; }
.article .source { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.callout { padding: 14px 16px; border-left: 3px solid var(--red); background: #f3e8d8; margin: 13px 0; }
.table-scroll { margin: 13px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; background: #fffbf4; font-size: 14px; text-align: left; }
caption { text-align: left; font-weight: 700; padding: 10px 12px; background: #f5eadb; }
th, td { padding: 8px 11px; border-bottom: 1px solid #eadfce; }
table time { white-space: nowrap; }
thead th { color: #442e24; background: #f0e2cf; }
tbody tr:nth-child(even) { background: #faf3e8; }
tbody tr:last-child > * { border-bottom: 0; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.filters .field { flex: 0 1 180px; }
.filters .button { min-height: 40px; }
.details { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.details summary { color: var(--red-dark); font-weight: 700; cursor: pointer; }
.pager { margin-top: 26px; padding-top: 15px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.no-script { margin: 12px 0; color: var(--red-dark); }
[hidden] { display: none !important; }

@media (max-width: 1080px) {
  .wrap { width: min(100% - 64px, 1248px); }
  .header-row { gap: 20px; }
  .nav { gap: clamp(14px, 2.2vw, 24px); }
  .hero-grid { gap: 32px; }
  .hero h1 { font-size: clamp(42px, 5.85vw, 66px); }
}
@media (max-width: 900px) {
  .wrap { width: calc(100% - 40px); }
  .header-row { flex-wrap: wrap; gap: 3px 15px; min-height: 0; padding-block: 12px 4px; }
  .nav { order: 3; width: 100%; justify-content: space-between; gap: 10px; }
  .hero-grid { grid-template-columns: 1fr; gap: 19px; }
  .hero-copy { max-width: 600px; }
  .hero-figure img { aspect-ratio: 1.65; }
  .animal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-wrap { grid-template-columns: 1fr; gap: 23px; }
  .article-side { position: static; }
  .article-side nav { display: flex; flex-wrap: wrap; column-gap: 15px; }
}
@media (max-width: 490px) {
  .wrap { width: calc(100% - 32px); }
  .nav { font-size: 12px; gap: 6px; }
  .brand { gap: 7px; }
  .brand-mark { width: 32px; height: 34px; font-size: 21px; }
  .brand-name { font-size: clamp(17px, 4.6vw, 22px); }
  .header-find { padding-inline: 10px; gap: 7px; }
  .hero-grid { padding-block: 29px 24px; }
  .hero h1 { font-size: clamp(39px, 10.5vw, 50px); }
  .hero-figure img { aspect-ratio: 1.39; }
  .calc { padding-inline: 11px; }
  .calc-fields { grid-template-columns: 1.26fr 1fr 1fr; }
  .calc-fields .button { grid-column: 1 / -1; width: 100%; }
  .section { padding-block: 36px; }
  .section-title { align-items: start; flex-direction: column; gap: 7px; }
  .animal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .card-info { padding-inline: 10px; }
  .card-name { font-size: 23px; }
  .guide-grid { grid-template-columns: 1fr; gap: 9px; }
  .guide-card { min-height: auto; padding: 15px; }
  .profile-head { grid-template-columns: 1fr; }
  .profile-head img { width: 190px; }
  .page-hero { padding-block: 21px 27px; }
  .article-wrap { padding-block: 24px 40px; }
  .year-editions { grid-template-columns: 1fr; }
  .year-edition-head img { width: 58px; }
}
:lang(zh-Hans) { font-family: "Almanac Serif", "Songti SC", SimSun, "Noto Serif CJK SC", serif; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.zodiac-explainer h3 { margin-top: 18px; font-size: 22px; }
.zodiac-explainer h3 + p { margin-top: 5px; }
#all-years tr { scroll-margin-top: 16px; }
#all-years tr:target > * { background: #f5e0c8; }
