:root {
  --paper: #f3efe6;
  --paper-deep: #e6dfd1;
  --ink: #1c1915;
  --muted: #5e584e;
  --line: #d4ccbc;
  --cinnabar: #9c2b22;
  --bronze: #8a7355;
  --display: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "WenQuanYi Zen Hei", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Zen Hei", sans-serif;
  --wrap: 64rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(28, 25, 21, 0.035) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--cinnabar); color: var(--paper); }
:focus-visible { outline: 2px solid var(--cinnabar); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.display { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
.kicker { font-size: 0.75rem; letter-spacing: 0.16em; color: var(--bronze); }
.muted { color: var(--muted); }
.isbn { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 95%, transparent);
  backdrop-filter: blur(6px);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; }
.brand strong { display: block; font-size: 0.875rem; font-weight: 500; }
.seal { width: 2.75rem; height: 2.75rem; color: var(--cinnabar); flex: none; }
.desk { display: none; gap: 2rem; }
.desk a, .mobile a { font-size: 0.875rem; }
.desk a:hover, .mobile a:hover, .text-link:hover, .title-link:hover { color: var(--cinnabar); }
.mobile { position: relative; }
.mobile summary {
  list-style: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.875rem;
}
.mobile summary::-webkit-details-marker { display: none; }
.mobile[open] summary { background: var(--ink); color: var(--paper); }
.mobile-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  min-width: 10rem;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 0.4rem 0;
}
.mobile-panel a { min-height: 2.75rem; display: flex; align-items: center; padding: 0 1rem; }
@media (min-width: 768px) {
  .desk { display: flex; }
  .mobile { display: none; }
}

.hero { padding: 4rem 0 3.5rem; }
@media (min-width: 768px) { .hero { padding: 6rem 0 5rem; } }
h1.display { font-size: 3rem; margin: 1.25rem 0 0; max-width: 16ch; }
@media (min-width: 640px) { h1.display { font-size: 3.75rem; } }
.lede { max-width: 36rem; font-size: 1.125rem; margin-top: 2rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--cinnabar);
  color: var(--cinnabar);
  font-size: 0.875rem;
}
.btn:hover { background: var(--cinnabar); color: var(--paper); }
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }

.works { border-top: 1px solid var(--line); scroll-margin-top: 6rem; padding: 3.5rem 0; }
@media (min-width: 768px) { .works { padding: 5rem 0; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.section-head h2 { font-size: 1.875rem; margin: 0; }
.work { display: grid; gap: 1.5rem; align-items: center; margin-top: 3rem; }
.work + .work { margin-top: 4rem; }
.shot { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.index-no { font-size: 1.875rem; color: var(--bronze); margin: 0; }
.work h3 { font-size: 1.875rem; margin: 0.5rem 0 0; }
.work h3 a:hover { color: var(--cinnabar); }
.more { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; margin-top: 0.5rem; color: var(--cinnabar); font-size: 0.875rem; }
@media (min-width: 768px) {
  .section-head h2 { font-size: 2.25rem; }
  .work { grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 4rem; }
  .work + .work { margin-top: 6rem; }
  .flip .shot-link { order: 2; }
  .work h3 { font-size: 2.25rem; }
}

.page { padding: 4rem 0 5rem; }
.page h1 { font-size: 2.5rem; }
@media (min-width: 640px) { .page h1 { font-size: 3rem; } }
.prose { max-width: 40rem; font-size: 1.125rem; }
.prose p { margin: 1rem 0 0; }
.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 3.5rem; }
.facts div { background: var(--paper); padding: 1.25rem; }
.facts dd { margin: 0.5rem 0 0; }
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } }
h2.display { font-size: 1.875rem; margin: 4rem 0 0; }
.table-wrap { margin-top: 2rem; overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; min-width: 36rem; border-collapse: collapse; text-align: left; font-size: 0.875rem; }
th { background: var(--paper-deep); color: var(--muted); font-weight: 500; }
th, td { padding: 0.9rem 1rem; border-top: 1px solid var(--line); }
thead th { border-top: 0; }
.title-link { font-size: 1.125rem; }

.game-top { padding-top: 2.5rem; }
.game-top h1 { font-size: 3rem; margin: 1rem 0 0; max-width: none; }
@media (min-width: 640px) { .game-top h1 { font-size: 3.75rem; } }
.caption { font-size: 0.75rem; color: var(--muted); margin: 0.5rem 0 0; }
.game-grid { display: grid; gap: 3rem; padding: 3rem 0; }
.meta { font-size: 0.875rem; }
.meta div { border-top: 1px solid var(--line); padding-top: 0.75rem; margin-top: 1.1rem; }
.meta dd { margin: 0.25rem 0 0; }
.game-grid .lead { font-size: 1.5rem; margin: 0; }
.game-grid .body p { margin: 1rem 0 0; }
@media (min-width: 768px) {
  .game-top { padding-top: 3.5rem; }
  .game-grid { grid-template-columns: 16rem 1fr; padding: 4rem 0; }
  .game-grid .lead { font-size: 1.875rem; }
}
.next { border-top: 1px solid var(--line); }
.next-inner { display: flex; flex-direction: column; gap: 0.4rem; padding: 2.5rem 0; }
.next a { font-size: 1.5rem; }
.next a:hover { color: var(--cinnabar); }
@media (min-width: 640px) {
  .next-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: auto; }
.foot { display: flex; flex-direction: column; gap: 2rem; padding: 2.5rem 0; }
.site-footer .display { font-size: 1.25rem; margin: 0; }
.site-footer a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.site-footer a:hover { color: var(--cinnabar); }
.foot-meta { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }
@media (min-width: 768px) {
  .foot { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
