/* 黄仙云岚：暖金宣纸、朱红印记与水墨蓝。 */
:root {
  --ink: #30271e;
  --paper: #fff6e5;
  --surface: #fff9ed;
  --magenta: #20634d;
  --blush: #fff6e5;
  --line: #dcc39b;
  --muted: #796650;
  --ball-red: #ed1c24;
  --ball-blue: #1677d2;
  --ball-green: #1ca65b;
  --yellow: var(--blush);
  --teal: var(--blush);
  --rose: var(--magenta);
  --article-size: 15px;
  --heading-wash: linear-gradient(105deg, #fff6e5 18%, #e9c468 100%);
  --red-wash: linear-gradient(110deg, #20634d, #27664f 60%, #174b3c);
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-synthesis: weight;
}
* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: clip; scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: #e0e8db; 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: none; 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(--magenta); 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(--magenta); background: linear-gradient(90deg, var(--paper), #fff0cd); 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: huangxian-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 huangxian-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(--blush); 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: #e9c468; color: var(--ink); font-weight: 800; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.prediction-result-strong { background: #e9c468; 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(--blush); 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: huangxian-spin 1s linear infinite; }
[data-state="loading"] .gallery-loading-spinner { display: block; }
@keyframes huangxian-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(--magenta); 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(--blush); 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; }
}

/* 黄仙云岚：业务文字保持 HTML，插画独立加载。 */
:root { --display-font: "STKaiti", "KaiTi", "Kaiti SC", "Noto Serif SC", serif; }
.index-shell, .page-shell, .ink-page-header { background: #faf7e9; }
.index-shell { border: 0; box-shadow: 0 12px 50px #61331620; }
.huangxian-hero { position: relative; overflow: hidden; aspect-ratio: 3 / 1.04; isolation: isolate; }
.huangxian-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.huangxian-hero-copy { position: relative; width: 64%; padding: 20px 0 10px 32px; }
.huangxian-hero-title { display: block; width: fit-content; color: #164d3b; font: 900 clamp(48px, 10vw, 90px)/1.1 var(--display-font); letter-spacing: .06em; text-shadow: 1px 1px #164d3b; }
.huangxian-hero-copy p { margin: 8px 0 10px; color: #24211c; font: 700 clamp(15px, 3.6vw, 27px)/1.4 var(--display-font); }
.huangxian-hero-caption { display: inline-block; padding: 3px 14px; background: #275d4c; color: #fff6dc; font: 16px/1.6 var(--display-font); letter-spacing: .12em; clip-path: polygon(2% 0,100% 5%,98% 94%,0 100%); }
.huangxian-seal { display: block; width: fit-content; margin-bottom: 4px; padding: 0 4px; color: #164d3b; border: 1px solid currentColor; font: 12px/1.5 var(--display-font); }
.index-notice { margin: 12px 0; border: 1px solid var(--line); background: #fff0d8; font-size: 13px; }
.index-footer { position: relative; padding: 28px 14px 42px; border-top: 0; background: #e0dbc1; color: #55402a; }
.index-footer::after { content: ""; position: absolute; inset: auto 0 0; height: 20px; background: radial-gradient(ellipse at 50% 100%, #275d46 60%, transparent 62%) 0 0 / 80px 28px repeat-x; }
@media (min-width:681px) { .index-shell { margin-block: 0 24px; } }
@media (max-width:680px) {
 .huangxian-hero { aspect-ratio: 2.45 / 1; }
 .huangxian-hero-copy { width: 67%; padding: 12px 0 10px 15px; }
 .huangxian-hero-title { font-size: clamp(42px, 12vw, 58px); }
 .huangxian-hero-copy p { margin: 5px 0 7px; font-size: clamp(13px,3.5vw,17px); }
 .huangxian-hero-caption { font-size: 11px; padding: 2px 8px; }
 .huangxian-seal { font-size: 10px; }
}
/* Allow the usable width to shrink with classic mobile scrollbars. */
html, body { min-width: 0; }
@media (max-width:360px) {
 .huangxian-hero { min-height: 150px; }
 .huangxian-hero-title { font-size: 40px; }
 .huangxian-hero-copy { padding-left: 12px; }
}
.huangxian-hero { width: 100%; }

/* 黄仙云岚：金黄衣袍与翡翠青山构成主题。 */
.huangxian-hero { aspect-ratio: 2.7 / 1; background: #f0e7d6; }
.huangxian-hero-title { color: #194d3d; text-shadow: none; }
.huangxian-hero-copy { padding-top: 24px; }
.huangxian-hero-art { object-position: right center; }
.huangxian-hero-caption { background: #b78b32; color: #fffdf0; }
.index-footer { color: #395140; border-top: 1px solid #bba56b; }
.index-footer::after { height: 24px; background: linear-gradient(150deg, transparent 35%, #497157 36% 55%, transparent 56%) 0 0 / 140px 50px repeat-x, linear-gradient(210deg,transparent 30%,#275d46 31%) 0 0 / 110px 40px repeat-x; }
@media(max-width:680px) {
 .huangxian-hero { aspect-ratio: 2.3 / 1; min-height: 158px; }
 .huangxian-hero-copy { padding-top: 16px; width: 66%; }
 .huangxian-hero-art { object-fit: cover; }
}
