@font-face { font-family: "Golden Brush"; font-weight: 400; font-display: swap; src: url("../images/golden-brush-0.woff2") format("woff2"); unicode-range: U+0000-4FFF; }
@font-face { font-family: "Golden Brush"; font-weight: 400; font-display: swap; src: url("../images/golden-brush-1.woff2") format("woff2"); unicode-range: U+5000-5FFF; }
@font-face { font-family: "Golden Brush"; font-weight: 400; font-display: swap; src: url("../images/golden-brush-2.woff2") format("woff2"); unicode-range: U+6000-6FFF; }
@font-face { font-family: "Golden Brush"; font-weight: 400; font-display: swap; src: url("../images/golden-brush-3.woff2") format("woff2"); unicode-range: U+7000-7FFF; }
@font-face { font-family: "Golden Brush"; font-weight: 400; font-display: swap; src: url("../images/golden-brush-4.woff2") format("woff2"); unicode-range: U+8000-8FFF; }
@font-face { font-family: "Golden Brush"; font-weight: 400; font-display: swap; src: url("../images/golden-brush-5.woff2") format("woff2"); unicode-range: U+9000-FFFF; }
@font-face { font-family: "Golden Serif"; font-weight: 400 500; font-display: swap; src: url("../images/golden-serif-regular-0.woff2") format("woff2"); unicode-range: U+0-6FFF; }
@font-face { font-family: "Golden Serif"; font-weight: 400 500; font-display: swap; src: url("../images/golden-serif-regular-1.woff2") format("woff2"); unicode-range: U+7000-FFFF; }
@font-face { font-family: "Golden Serif"; font-weight: 600 900; font-display: swap; src: url("../images/golden-serif-bold-0.woff2") format("woff2"); unicode-range: U+0-6FFF; }
@font-face { font-family: "Golden Serif"; font-weight: 600 900; font-display: swap; src: url("../images/golden-serif-bold-1.woff2") format("woff2"); unicode-range: U+7000-FFFF; }
:root {
  --ink: #302319; --paper: #fbf0d8; --surface: #fff7e5; --wood: #f0d49d;
  --cinnabar: #982c1d; --gold: #bb8840; --line: #d0ae72; --muted: #786349;
  --jade: #315e50; --yellow: #f0dbad; --teal: #e6e8d9; --rose: #982f25;
  --ball-red: #d92f3c; --ball-blue: #187fbd; --ball-green: #168650;
  --article-size: 15px; --page-width: 900px; --paper-texture: url("../images/paper-grain.svg");
  font-family: "Golden Serif", "Songti SC", "SimSun", serif; color: var(--ink); background: var(--wood);
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; font-size: 15px; line-height: 1.65; background: #e9dab9; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
:is(a, button, [tabindex]):focus-visible { outline: 2px solid var(--cinnabar); outline-offset: 3px; }
[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; white-space: nowrap !important; border: 0 !important; }
.index-shell, .page-shell, .ink-page-header, .site-footer { width: min(var(--page-width), 100%); margin-inline: auto; }
.index-shell { min-height: 100vh; border-inline: 1px solid #d9bc84; background: var(--wood) url("../images/caishen-surround.png") center top / 100% auto repeat-y; }
.page-shell { min-height: 50vh; padding: 20px 16px; background: var(--paper) var(--paper-texture); }
.gold-masthead { position: relative; display: flex; width: 100%; min-width: 0; min-height: 84px; aspect-ratio: 4.2 / 1; align-items: flex-start; justify-content: center; padding: 1.8% 0 0; overflow: hidden; color: #b38a38; background: var(--wood) url("../images/caishen-hero.png") center top / cover no-repeat; }
.index-brand { position: relative; z-index: 1; display: flex; min-width: 0; align-items: center; }
.index-brand-copy { display: grid; min-width: 0; justify-items: center; gap: 3px; }
.index-brand strong { font-family: inherit; font-size: clamp(20px, 5.6vw, 50px); line-height: 1.13; font-weight: 400; letter-spacing: .04em; padding-left: .04em; -webkit-text-stroke: .65px #715025; text-shadow: 0 1px #fff1ba; }
.index-brand small { color: var(--cinnabar); font-family: "Golden Brush", "KaiTi", serif; font-size: clamp(10px, 1.85vw, 17px); letter-spacing: .08em; }
.index-notice { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: #f3e3bd; color: #735234; font-size: 12px; }
.index-notice-icon { flex: 0 0 20px; display: grid; cursor: pointer; }
.index-notice-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.index-notice-pause:focus-visible + .index-notice-icon { outline: 2px solid var(--cinnabar); }
.index-notice-viewport { flex: 1; min-width: 0; overflow: hidden; }
.index-notice-track { display: flex; width: max-content; animation: notice-scroll 32s linear infinite; }
.index-notice-copy { flex: none; padding-right: 40px; white-space: nowrap; }
.index-notice-copy i { margin-inline: 8px; font-style: normal; }
.index-notice:hover .index-notice-track, .index-notice-pause:checked ~ .index-notice-viewport .index-notice-track { animation-play-state: paused; }
@keyframes notice-scroll { to { transform: translateX(-50%); } }
.degraded-banner { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #f4d6bb; font-size: 13px; }
.empty-state { padding: 20px 12px; color: var(--muted); text-align: center; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; }
.masonry-card { min-width: 0; background-color: var(--paper); background-image: var(--paper-texture); }
.index-feed > .masonry-card, .server-domain-announcement, .index-draw-board .draw-lottery { border: 7px solid transparent; border-image: url("../images/gold-frame.svg") 12 stretch; background-clip: padding-box; }
.index-feed > .current-articles-card:has(+ .other-articles-card) { border-bottom-width: 0; }
.index-feed > .current-articles-card + .other-articles-card { margin-top: -4px; border-top-width: 0; }
.card-heading { margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #f3e3bd; }
.card-heading h1, .card-heading h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.article-body, .document-body { max-width: 100%; padding: 12px; overflow-x: auto; overflow-wrap: anywhere; 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.7; }
.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; border-collapse: collapse; margin: 0; background: transparent; }
.article-body :is(th, td), .document-body :is(th, td) { padding: 8px 5px; border: 1px solid var(--line); text-align: center !important; vertical-align: middle; }
.article-body th, .document-body th { background: #efddba; font-weight: 400; }
.article-body tbody tr:nth-child(even), .document-body tbody tr:nth-child(even) { background: #f4e4c633; }
.article-body img, .document-body img { height: auto; object-fit: contain; }
.prediction-hit, .prediction-result-strong, .article-body mark { padding: 1px 2px; color: #a32016; background: #f1d38e; }
.article-body :is(.prediction-content, .prediction-layout-v2), .document-body :is(.prediction-content, .prediction-layout-v2) { background: transparent; color: var(--ink); border-color: var(--line); }
.article-body :is(.prediction-content, .prediction-layout-v2) :is(.prediction-hit, .prediction-result-strong), .document-body :is(.prediction-content, .prediction-layout-v2) :is(.prediction-hit, .prediction-result-strong) { color: #a32016; background: #f1d38e; }
.site-footer, .index-footer { padding: 0 5% 20px; background: var(--wood) url("../images/caishen-surround.png") center bottom / 100% auto; color: #fff1ce; text-align: center; }
.gold-footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 5px 0; border: 1px solid var(--gold); background: #962919; }
.gold-footer-nav a { display: grid; justify-items: center; align-content: center; min-height: 40px; padding: 5px 2px; font-size: clamp(13px, 2.2vw, 20px); line-height: 1.35; }
.gold-footer-nav a + a { border-left: 1px solid #e4bc7866; }
.gold-footer-nav svg { width: clamp(24px, 4.8vw, 44px); height: clamp(24px, 4.8vw, 44px); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gold-footer-nav [aria-current="page"], .gold-footer-nav a:hover { color: #f7d87e; }
.gold-footer-nav [aria-current="page"] .footer-home-roof { fill: currentColor; }
.index-image-flow, .image-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.index-image-item, .image-item { min-width: 0; text-align: center; }
.index-image-item img, .image-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f4e5c9; }
.index-image-item span, .image-item span { display: block; padding: 6px 2px; overflow-wrap: anywhere; }
.gallery-load-zone { display: grid; justify-items: center; padding: 16px; }
.gallery-load-more { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 18px; border: 1px solid var(--gold); border-radius: 0; background: var(--paper); color: var(--ink); }
.gallery-loading-spinner { display: none; width: 14px; height: 14px; border: 2px solid var(--gold); border-right-color: transparent; border-radius: 50%; animation: loading-spin 1s linear infinite; }
[data-state="loading"] .gallery-loading-spinner { display: block; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.home-modal { position: fixed; width: min(900px, calc(100% - 24px)); max-height: 92vh; padding: 12px; border: 1px solid var(--gold); background: var(--paper); }
.home-modal::backdrop { background: #22160dcc; }
.home-modal img { width: 100%; max-height: 80vh; object-fit: contain; }
.home-modal button { min-height: 40px; border: 0; color: var(--paper); background: var(--cinnabar); }
.home-back-to-top, .history-back-to-top { position: fixed; z-index: 30; right: max(12px, calc((100vw - var(--page-width)) / 2 + 12px)); bottom: 18px; display: grid; place-items: center; width: 42px; height: 42px; padding: 9px; border: 1px solid #e1bc6a; border-radius: 0; background: var(--cinnabar); color: var(--paper); }
.home-back-to-top svg, .history-back-to-top svg { width: 24px; height: 24px; }
.number-attributes-content { padding: 0 10px 10px; }
.number-attributes-year { margin: 0 0 8px; text-align: center; font-size: 14px; }
.index-feed .number-attrs-card .number-attributes-year { display: none; }
.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 { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.zodiac-identity { display: flex; flex: none; align-items: center; justify-content: center; gap: 4px; }
.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: inline-block; min-width: 1.6em; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; font-size: 14px; }
.number-category-title { margin: 12px 0 0; padding: 4px 10px; border-block: 1px solid var(--line); background: var(--yellow); color: var(--cinnabar); font-family: "Golden Brush", "KaiTi", serif; font-weight: 400; font-size: 22px; }
.attribute-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); padding: 6px 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: clamp(16px, 2.55vw, 24px); } }
@media (max-width: 680px) {
  .gold-masthead { min-height: 84px; padding-top: 6px; }
  .index-brand-copy { gap: 0; }
  .index-brand small { letter-spacing: .02em; }
  .index-feed > .masonry-card, .server-domain-announcement, .index-draw-board .draw-lottery { border-width: 4px; }
  .index-feed > .current-articles-card:has(+ .other-articles-card) { border-bottom-width: 0; }
  .index-feed > .current-articles-card + .other-articles-card { border-top-width: 0; }
  .gold-footer-nav a { min-height: 36px; }
  .zodiac-number-item { gap: 4px; padding: 5px 3px; }
  .zodiac-opposite { display: none; }
  .attribute-number-list { gap: 2px; }
  .attribute-number { font-size: 12px; min-width: 1.4em; }
  .page-shell { padding: 12px 8px; }
  .article-body, .document-body { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .index-notice-track { width: 100%; animation: none; }
  .index-notice-copy { width: 100%; white-space: normal; padding-right: 0; }
  .index-notice-copy[aria-hidden="true"] { display: none; }
  .gallery-loading-spinner { animation: none; }
}
