@font-face { font-family: 'Legend Heading'; src: url('../assets/heading.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Legend Text'; src: url('../assets/body.ttf') format('truetype'); font-weight: 400 500; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  /* 宽屏同步放大内容、字号和间距，避免固定宽度造成页面过小。 */
  --layout-width: min(92%, 2800px);
  --card-space: clamp(18px, 1.35vw, 46px);
  --paper: #f8f7f4;
  --surface: #fff;
  --ink: #12191d;
  --muted: #64615c;
  --gold: #bd9255;
  --gold-light: #e3cda6;
  --red: #a33425;
  --red-dark: #81271d;
  --serif: 'Legend Heading', 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --sans: 'Legend Text', 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; }
a { color: inherit; }
button, a { outline-offset: 5px; }
:focus-visible { outline: 3px solid #1d6593; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 5; transform: translateY(-180%); background: white; padding: 12px 20px; }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.site-header { width: var(--layout-width); margin: auto; min-height: 94px; padding: clamp(16px, 1.2vw, 36px) 12px clamp(18px, 1.2vw, 36px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-bottom: 1px solid #d5c1a2; }
.brand { display: inline-flex; align-items: center; gap: 16px; color: #501b14; font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', var(--serif); font-size: clamp(52px, 3.5vw, 96px); font-weight: 700; line-height: 1.3; white-space: nowrap; text-decoration: none; }
.brand-rule { width: 66px; height: 1px; position: relative; background: var(--gold); flex-shrink: 0; }
.brand-rule::before { content: ''; position: absolute; width: 27px; height: 3px; top: -1px; left: 0; background: var(--gold); }
.brand { min-height: 60px; max-width: 100%; min-width: 0; }
.brand-text { white-space: normal; overflow-wrap: anywhere; }
.brand-image { display: none; width: clamp(400px, 24vw, 720px); max-width: 100%; height: auto; aspect-ratio: 720 / 329; object-fit: contain; object-position: center; }
.brand[data-logo='image'] .brand-image { display: block; }
.brand[data-logo='image'] .brand-text, .brand[data-logo='image'] .brand-rule { display: none; }
.site-slogan { margin: 0; font: 500 clamp(19px, 1.15vw, 32px)/1.8 var(--sans); letter-spacing: 2px; color: #806b52; text-align: center; }
.page { width: var(--layout-width); margin: clamp(24px, 1.6vw, 48px) auto 0; }
.version-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 1.5vw, 48px); scroll-margin-top: 20px; }
.version-card { --version-color: #8f3026; --tag-bg: #fbede8; min-width: 0; padding: var(--card-space); border: 1px solid var(--gold-light); border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; position: relative; }
.version-card[data-version='180'] { --version-color: #285b7c; --tag-bg: #eaf2f8; }
.version-card[data-version='chenmo'] { --version-color: #2e6650; --tag-bg: #eaf4ed; }
.version-card::before { content: ''; position: absolute; inset: 4px; border-radius: 4px; pointer-events: none; background: linear-gradient(var(--gold),var(--gold)) left top/8px 1px no-repeat, linear-gradient(var(--gold),var(--gold)) left top/1px 8px no-repeat, linear-gradient(var(--gold),var(--gold)) right top/8px 1px no-repeat, linear-gradient(var(--gold),var(--gold)) right top/1px 8px no-repeat, linear-gradient(var(--gold),var(--gold)) left bottom/8px 1px no-repeat, linear-gradient(var(--gold),var(--gold)) left bottom/1px 8px no-repeat, linear-gradient(var(--gold),var(--gold)) right bottom/8px 1px no-repeat, linear-gradient(var(--gold),var(--gold)) right bottom/1px 8px no-repeat; }
.cover { width: 100%; aspect-ratio: 1.88; overflow: hidden; border-radius: 9px; background: #f5f0e5; display: grid; place-items: center; position: relative; container-type: inline-size; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover img[hidden] { display: none; }
/* 静态制作状态；版本上线后删除 HTML 中 production-stamp 元素即可。 */
.production-stamp { position: absolute; right: 5%; bottom: 10%; transform: rotate(-10deg); padding: .35em .65em; border: 3px double #596a61; border-radius: 4px; background: linear-gradient(135deg, #f4f5eaeF, #cbd3c5ed 48%, #f8f8eced); color: #344d40; font: 700 clamp(13px, 4.5cqi, 36px)/1.5 'Microsoft YaHei', '微软雅黑', sans-serif; letter-spacing: .12em; white-space: nowrap; text-shadow: 0 1px #fff; box-shadow: inset 0 0 0 1px #ffffffb3, 1px 2px 3px #263e3026; pointer-events: none; }
.version-title { color: var(--version-color); margin: var(--card-space) 0 clamp(14px, 1vw, 28px); font: 700 clamp(22px, 1.65vw, 48px)/1.5 'Microsoft YaHei', '微软雅黑', 'PingFang SC', sans-serif; text-align: center; overflow-wrap: anywhere; }
.tags { margin-bottom: var(--card-space); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px clamp(16px, 1.2vw, 32px); }
.tag { display: inline-block; padding: .45em 1em; border-radius: 7px; background: var(--tag-bg); color: var(--version-color); font: 500 clamp(15px, 1vw, 28px)/1.4 'Microsoft YaHei', '微软雅黑', 'PingFang SC', sans-serif; overflow-wrap: anywhere; max-width: 100%; }
.card-actions { display: flex; justify-content: center; border-top: 1px solid #e6e4e0; padding-top: var(--card-space); margin-top: auto; padding-bottom: 8px; }
.card-actions .ornate-button { width: 100%; max-width: clamp(280px, 19vw, 560px); }
.ornate-button { min-height: clamp(60px, 3.8vw, 108px); padding: 12px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; position: relative; border: 1px solid #bf8f55; border-radius: 9px; font: 700 clamp(20px, 1.3vw, 36px)/1.35 var(--serif); text-decoration: none; cursor: pointer; text-align: center; transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.ornate-button svg { width: 1.1em; height: 1.1em; }
.ornate-button::before { content: ''; position: absolute; inset: 4px; pointer-events: none; border: 1px solid currentColor; opacity: .65; clip-path: polygon(0 8px,8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px)); }
.ornate-button::after { content: ''; position: absolute; inset: 3px; pointer-events: none; background: linear-gradient(135deg,transparent 44%,#d4ab70 45%,#d4ab70 54%,transparent 55%) top left/9px 9px no-repeat, linear-gradient(225deg,transparent 44%,#d4ab70 45%,#d4ab70 54%,transparent 55%) top right/9px 9px no-repeat, linear-gradient(45deg,transparent 44%,#d4ab70 45%,#d4ab70 54%,transparent 55%) bottom left/9px 9px no-repeat, linear-gradient(315deg,transparent 44%,#d4ab70 45%,#d4ab70 54%,transparent 55%) bottom right/9px 9px no-repeat; }
.primary { background: var(--red); color: #fff7e9; box-shadow: inset 0 0 0 2px #a33425, inset 0 0 0 3px #d9b473; }
.primary::before { color: #efd1a0; }
@media (hover: hover) { .primary:hover { background: var(--red-dark); box-shadow: inset 0 0 0 2px var(--red-dark), inset 0 0 0 3px #d9b473, 0 3px 10px #6a24121a; } }
.ornate-button:active { transform: translateY(1px); }
.ornate-button[aria-disabled='true'] { background: #e8e5e0; color: #666; cursor: not-allowed; box-shadow: none; }
.site-footer { width: var(--layout-width); margin: clamp(32px, 2.5vw, 72px) auto 0; padding-bottom: max(32px, env(safe-area-inset-bottom)); color: #806b52; text-align: center; }
.footer-divider { display: flex; align-items: center; gap: 28px; font: clamp(18px, 1.1vw, 30px)/1.5 Georgia, serif; letter-spacing: .4px; }
.footer-divider::before, .footer-divider::after { content: ''; height: 1px; background: #d5c1a2; flex: 1; }
.footer-divider span { flex-shrink: 0; }
.footer-content { padding: 22px 16px 0; font: clamp(14px, .9vw, 24px)/1.8 var(--sans); color: #746b60; }
.copyright { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 18px; margin: 0; overflow-wrap: anywhere; }
#copyright-owner { color: #69493a; font-weight: 500; }
.copyright-rights { color: #746b60; }
.footer-note { margin: 10px 0 0; overflow-wrap: anywhere; }
.footer-records { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 22px; margin-top: 8px; }
.footer-records[hidden], .footer-note[hidden] { display: none; }
.footer-record { max-width: 100%; overflow-wrap: anywhere; }
a.footer-record { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 2px; text-decoration: underline; text-decoration-color: #cbb99e; text-underline-offset: 4px; border-radius: 2px; }
@media (hover: hover) { a.footer-record:hover { color: var(--red-dark); text-decoration-color: currentColor; } }
@media (max-width: 1100px) { :root { --layout-width: calc(100% - 48px); } .version-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .site-header { padding-inline: 12px; } .version-title { font-size: 25px; } }
@media (max-width: 680px) {
  .site-header { width: calc(100% - 32px); min-height: 80px; padding: 14px 2px; gap: 4px; }
  .brand { font-size: 38px; gap: 9px; min-height: 44px; }
  .brand-rule { width: 24px; }
  .brand-rule::before { width: 12px; }
  .brand-image { width: min(320px, 85vw); }
  .site-slogan { font-size: 14px; letter-spacing: 1.5px; }
  .page { width: calc(100% - 32px); max-width: 540px; margin-top: 24px; }
  .version-grid { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .version-card { padding: 16px; }
  .version-title { margin-top: 19px; font-size: 24px; }
  .tag { font-size: 14px; padding: 6px 12px; }
  .card-actions { gap: 12px; padding-top: 18px; padding-bottom: 4px; }
  .ornate-button { font-size: 18px; min-height: 54px; gap: 7px; padding: 12px 8px; }
  .ornate-button svg { width: 19px; height: 19px; }
  .site-footer { width: calc(100% - 32px); margin-top: 34px; }
  .footer-divider { font-size: 15px; gap: 16px; }
  .footer-content { padding: 18px 6px 0; font-size: 13px; }
  .copyright { flex-direction: column; align-items: center; gap: 3px; }
  .footer-records { flex-direction: column; gap: 0; }
}
@media (max-width: 380px) { .brand { font-size: 34px; } .brand-rule { display: none; } .site-slogan { font-size: 13px; letter-spacing: 0; } .version-card { padding: 14px; } .version-title { font-size: 22px; } .ornate-button { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media (forced-colors: active) { .ornate-button { border: 2px solid ButtonText; } .version-card { border-color: CanvasText; } }
