/* 经典图册共用纸页。色板来自投资完整版实际令牌。不加载网络字体。 */

:root {
  --paper: #f3ede2;
  --sheet: #fbf8f1;
  --pine: #1e3a2d;
  --classic-ink: #2b2925;
  --bronze: #9c6b36;
  --bronze-ink: #6b4520;
  --line: #d3c9b6;
  --muted: #5c564e;
}

[hidden] {
  display: none !important;
}

body[data-classic] {
  margin: 0;
  background: var(--paper);
  color: var(--classic-ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 19px;
  line-height: 1.85;
  overflow-wrap: break-word;
  overflow-x: clip;
}

body[data-classic] *,
body[data-classic] *::before,
body[data-classic] *::after {
  box-sizing: border-box;
}

body[data-classic] h1,
body[data-classic] h2,
body[data-classic] h3 {
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  color: var(--pine);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: break-word;
}

body[data-classic] a {
  color: var(--pine);
}

body[data-classic] :focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

body[data-classic] ::selection {
  background: var(--pine);
  color: var(--sheet);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 8;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--sheet);
  color: var(--pine);
}

.skip-link:focus {
  top: 8px;
}

.mast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: 44px;
  padding: 6px 22px;
  border-bottom: 1px solid var(--line);
}

.mast-brand {
  margin: 0;
  color: var(--pine);
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 16px;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.mast-slash {
  color: var(--bronze);
}

.mast-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
}

.mast-nav a,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--pine);
  font-size: 16px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--bronze-ink);
  font-size: 14px;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.dek,
.home-main p,
.shelf-main p {
  max-width: 36em;
  font-size: 19px;
  line-height: 1.85;
}

.home-main,
.shelf-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

body[data-classic="home"] .home-main h1,
body[data-classic="home"] .shelf-main h1 {
  margin: 0 0 12px;
  font-size: clamp(40px, 8vw, 64px);
  line-height: 1.08;
}

.home-grid,
.shelf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin-top: 28px;
}

.home-card,
.shelf-card {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.home-card h2,
.shelf-card h2 {
  margin: 8px 0 4px;
  font-size: clamp(28px, 4vw, 36px);
}

.home-card figure,
.shelf-card figure {
  margin: 0 0 12px;
}

body[data-classic="home"] img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  object-position: center;
  background: var(--sheet);
}

.hero-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero-row figure {
  margin: 0;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--pine);
  vertical-align: 1px;
}

.shelf-card[data-element="earth"] .dot { background: #2f4a38; }
.shelf-card[data-element="water"] .dot { background: #5d7380; }
.shelf-card[data-element="fire"] .dot { background: #9c6b36; }
.shelf-card[data-element="air"] .dot { background: #6a7564; }

@media (min-width: 800px) {
  .home-grid,
  .shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 28px;
  }
}

@media (min-width: 1100px) {
  body[data-classic="home"] .home-main h1,
  body[data-classic="home"] .shelf-main h1 {
    font-size: clamp(64px, 5vw, 88px);
  }
}

@media (max-width: 390px) {
  body[data-classic] {
    font-size: 18px;
  }

  .mast,
  .home-main,
  .shelf-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-main,
  .shelf-main {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-classic] *,
  body[data-classic] *::before,
  body[data-classic] *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
