/* 海沫茶花：宋体、海沫浅黄绿与茶花红；功能文字使用深红色。 */
@font-face { font-family: "Seafoam Serif"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../images/seafoam-serif-regular-0.woff2") format("woff2"); unicode-range: U+0-6FFF; }
@font-face { font-family: "Seafoam Serif"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../images/seafoam-serif-regular-1.woff2") format("woff2"); unicode-range: U+7000-FFFF; }
@font-face { font-family: "Seafoam Serif"; font-style: normal; font-weight: 600 900; font-display: swap; src: url("../images/seafoam-serif-bold-0.woff2") format("woff2"); unicode-range: U+0-6FFF; }
@font-face { font-family: "Seafoam Serif"; font-style: normal; font-weight: 600 900; font-display: swap; src: url("../images/seafoam-serif-bold-1.woff2") format("woff2"); unicode-range: U+7000-FFFF; }
:root {
  --ink: #742633;
  --paper: #f9ffd3;
  --surface: #fffced;
  --camellia: #ee3f4d;
  --seafoam: #f9ffd3;
  --line: #dec9b7;
  --muted: #8e5152;
  --ball-red: #ed1c24;
  --ball-blue: #1677d2;
  --ball-green: #1ca65b;
  --yellow: var(--seafoam);
  --teal: var(--seafoam);
  --rose: var(--camellia);
  --article-size: 15px;
  --heading-wash: linear-gradient(105deg, #f9ffd3 18%, #f3b4a0 100%);
  --red-wash: linear-gradient(110deg, #ee3f4d, #bb182d 60%, #982936);
  color: var(--ink);
  background: var(--paper);
  font-family: "Seafoam Serif", "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  font-synthesis: weight;
}
* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: clip; scroll-behavior: smooth; }
body { min-width: 320px; overflow-x: clip; margin: 0; background: linear-gradient(180deg, #f9ffd3, #f3b4a0 55%, #ee3f4d 85%, #982936) fixed; color: var(--ink); font-size: 15px; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
button, input, dialog { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, .index-notice-pause:focus-visible + .index-notice-icon { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
.page-shell, .ink-page-header, .index-shell, .site-footer { width: min(760px, 100%); margin-inline: auto; }
.index-shell { min-height: 100vh; background: var(--surface); border-inline: 1px solid var(--line); }
.page-shell { min-height: 50vh; padding: 16px 14px 24px; background: var(--paper); }
.index-header { position: relative; min-height: 84px; padding: 16px 14px; overflow: hidden; background: var(--paper); color: var(--ink); }
.index-header::before { position: absolute; inset: 0 0 0 auto; width: min(320px, 100%); background: url("../images/camellia-header.webp") right center / auto 160px no-repeat; mask-image: linear-gradient(90deg, transparent, #000 35%); content: ""; pointer-events: none; }
.index-brand { position: relative; display: flex; width: 78%; align-items: center; gap: 10px; line-height: 1.2; }
.index-logo { width: 44px; height: 44px; flex: none; border: 1px solid var(--camellia); border-radius: 50%; object-fit: contain; }
.index-brand-copy { display: grid; min-width: 0; gap: 5px; }
.index-brand strong { font-size: 26px; font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; }
.index-brand small { color: var(--ink); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.index-notice { display: flex; width: 100%; min-height: 38px; padding: 6px 14px; align-items: center; gap: 10px; border-block: 1px solid var(--camellia); background: linear-gradient(90deg, var(--paper), #ffe9cb); color: var(--ink); font-size: 14px; line-height: 22px; }
.index-notice-icon { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; cursor: pointer; }
.index-notice-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.index-notice-viewport { min-width: 0; flex: 1 1 0%; overflow: hidden; }
.index-notice-track { display: flex; width: max-content; animation: seafoam-notice 30s linear infinite; }
.index-notice-copy { flex: none; padding-right: 38px; white-space: nowrap; }
.index-notice-copy i { margin-inline: 10px; font-style: normal; }
.index-notice:hover .index-notice-track, .index-notice-pause:checked ~ .index-notice-viewport .index-notice-track { animation-play-state: paused; }
@keyframes seafoam-notice { to { transform: translateX(-50%); } }
@media (min-width: 380px) {
  .index-notice-pause { display: none; }
  .index-notice-icon { cursor: default; }
  .index-notice-track { width: 100%; animation: none; }
  .index-notice-copy { width: 100%; min-width: 0; padding-right: 0; text-align: center; white-space: normal; }
  .index-notice-copy[aria-hidden="true"] { display: none; }
}
.degraded-banner { display: flex; width: min(760px, 100%); margin: 0 auto; padding: 9px 14px; flex-wrap: wrap; justify-content: center; gap: 4px 12px; border-block: 1px solid var(--ink); background: var(--seafoam); color: var(--ink); font-size: 14px; }
.eyebrow { margin: 0; color: var(--ink); font-size: 13px; }
.empty-state { padding: 16px; color: var(--muted); }
.masonry-card { min-width: 0; padding: 0; background: transparent; }
.card-heading { margin: 0 0 12px; padding: 12px 14px; background: var(--heading-wash); }
.card-heading h1, .card-heading h2 { margin: 0; font-size: 20px; }
.detail-page-card { margin: 0; }
.article-body, .document-body { width: 100%; max-width: 100%; overflow-x: auto; overflow-wrap: anywhere; color: var(--ink); font-size: var(--article-size); }
.article-body *, .document-body * { max-width: 100%; font-family: inherit !important; font-size: var(--article-size) !important; line-height: 1.65; }
.article-body > :first-child, .document-body > :first-child { margin-top: 0; }
.article-body > :last-child, .document-body > :last-child { margin-bottom: 0; }
.article-body table, .document-body table { width: 100% !important; height: auto; margin: 0; border-collapse: collapse; background: transparent; }
.article-body :is(th, td), .document-body :is(th, td) { height: auto; padding: 10px 5px; border: 1px solid var(--line); text-align: center !important; vertical-align: middle; }
.article-body img, .document-body img { height: auto; object-fit: contain; }
.prediction-hit, .article-body mark { padding: 1px 2px; border-radius: 2px; background: #f3b4a0; color: var(--ink); font-weight: 800; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.prediction-result-strong { background: #f3b4a0; color: #c00000; }
.site-footer, .index-footer { padding: 24px 14px; border-top: 1px solid var(--ink); background: var(--paper); color: var(--muted); text-align: center; font-size: 12px; }
.site-footer p, .index-footer p { margin: 0; }
.index-image-flow, .image-flow { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.index-image-item, .image-item { min-width: 0; text-align: center; }
.index-image-item img, .image-item img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: contain; background: var(--surface); }
.index-image-item span, .image-item span { display: block; padding-block: 4px; overflow-wrap: anywhere; }
.gallery-load-zone { display: grid; justify-items: center; padding: 16px; }
.gallery-load-more { display: inline-flex; min-height: 40px; padding: 8px 14px; align-items: center; gap: 8px; border: 1px solid var(--ink); border-radius: 4px; background: var(--seafoam); color: var(--ink); }
.gallery-loading-spinner { display: none; width: 14px; height: 14px; border: 2px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: seafoam-spin 1s linear infinite; }
[data-state="loading"] .gallery-loading-spinner { display: block; }
@keyframes seafoam-spin { to { transform: rotate(360deg); } }
.home-modal { position: fixed; width: min(900px, calc(100% - 24px)); max-height: 92vh; padding: 12px; border: 1px solid var(--ink); background: var(--surface); }
.home-modal::backdrop { background: rgb(116 38 51 / 82%); }
.home-modal img { width: 100%; max-height: 80vh; object-fit: contain; }
.home-modal button { min-height: 38px; border: 0; background: var(--ink); color: #fff; }
.home-back-to-top, .history-back-to-top { position: fixed; z-index: 30; right: max(12px, calc((100vw - 760px) / 2 + 12px)); bottom: 18px; display: grid; width: 44px; height: 44px; padding: 10px; place-items: center; border: 1px solid var(--ink); border-radius: 2px; background: var(--camellia); color: var(--paper); line-height: 1; }
.home-back-to-top svg, .history-back-to-top svg { width: 24px; height: 24px; }
.number-attributes-content { padding: 12px 8px; }
.number-attributes-year { margin: 0 0 14px; text-align: center; font-size: 19px; }
.zodiac-number-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.zodiac-number-item { min-width: 0; padding: 10px 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.zodiac-identity { display: flex; margin-bottom: 6px; align-items: center; justify-content: center; gap: 6px; }
.zodiac-icon { width: 30px; height: 30px; }
.zodiac-opposite { color: var(--muted); font-size: 12px; }
.attribute-number-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.attribute-number { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; }
.attribute-number.ball-red { background: var(--ball-red); color: #000; }
.attribute-number.ball-green { background: var(--ball-green); color: #101010; }
.attribute-number.ball-blue { background: var(--ball-blue); color: #fff; }
.number-category-title { margin: 16px 0 0; padding: 8px 12px; background: var(--seafoam); font-size: 17px; }
.attribute-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); padding: 10px 5px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.attribute-label { text-align: center; }
.attribute-row .attribute-number-list { justify-content: flex-start; }
@media (min-width: 681px) {
  :root { --article-size: 16px; }
  .index-shell { margin-block: 24px; }
  .index-header { min-height: 106px; padding: 22px 24px; }
  .index-header::before { width: 420px; background-size: auto 210px; }
  .index-logo { width: 52px; height: 52px; }
  .index-brand strong { font-size: 32px; }
  .index-brand small { font-size: 13px; }
  }
@media (max-width: 360px) {
  .index-header { padding-inline: 14px; }
  .index-brand { gap: 8px; }
  .index-notice { padding-inline: 10px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .index-notice-pause { display: none; }
  .index-notice-icon { cursor: default; }
  .index-notice-track { width: 100%; animation: none; }
  .index-notice-copy { width: 100%; min-width: 0; padding-right: 0; text-align: center; white-space: normal; }
  .index-notice-copy[aria-hidden="true"] { display: none; }
  .gallery-loading-spinner { animation: none; }
}
