﻿/* ------------- Design Tokens ------------- */
  /* 把主题相关的颜色变量登记为 <color> 类型,
     CSS 才能在主题切换时对它们做逐帧插值
     (未注册的 custom property 只是字符串,transition 对它无效) */
  @property --ink         { syntax: '<color>'; inherits: true; initial-value: #0E0F13; }
  @property --ink-2       { syntax: '<color>'; inherits: true; initial-value: #151821; }
  @property --ink-3       { syntax: '<color>'; inherits: true; initial-value: #1C202C; }
  @property --paper       { syntax: '<color>'; inherits: true; initial-value: #EDE6D3; }
  @property --paper-dim   { syntax: '<color>'; inherits: true; initial-value: #A8A293; }
  @property --ink-fade-1  { syntax: '<color>'; inherits: true; initial-value: rgba(14, 15, 19, 0.70); }
  @property --ink-fade-2  { syntax: '<color>'; inherits: true; initial-value: rgba(14, 15, 19, 0.85); }
  @property --hero-tint   { syntax: '<color>'; inherits: true; initial-value: rgba(200, 57, 46, 0.14); }
  @property --verse-band  { syntax: '<color>'; inherits: true; initial-value: #151821; }

  :root {
    --ink: #0E0F13;
    --ink-2: #151821;
    --ink-3: #1C202C;
    --paper: #EDE6D3;
    --paper-dim: #A8A293;
    --cinnabar: #C8392E;
    --cinnabar-deep: #9E2A21;
    --gold: #C8A96A;
    --gold-dim: #7A6A45;
    --jade: #5C8A6B;
    --line: rgba(237, 230, 211, 0.12);
    --line-strong: rgba(237, 230, 211, 0.24);

    /* 渐变辅助色 —— 放进变量,主题切换时才能平滑插值 */
    --ink-fade-1: rgba(14, 15, 19, 0.70);
    --ink-fade-2: rgba(14, 15, 19, 0.85);
    --hero-tint: rgba(200, 57, 46, 0.14);
    --verse-band: #151821;

    --font-serif: "Noto Serif SC", "Source Han Serif SC", serif;
    --font-sans: "Noto Sans SC", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --font-pixel: "VT323", monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* ------------- Light theme overrides ------------- */
  [data-theme="light"] {
    --ink: #F5EEDB;
    --ink-2: #EBE2C9;
    --ink-3: #DFD4B7;
    --paper: #1C2029;
    --paper-dim: #6B6E7A;
    --line: rgba(28, 32, 41, 0.14);
    --line-strong: rgba(28, 32, 41, 0.28);

    --ink-fade-1: rgba(245, 238, 219, 0.62);
    --ink-fade-2: rgba(245, 238, 219, 0.82);
    --hero-tint: rgba(200, 169, 106, 0.22);
    --verse-band: #DFD4B7;
  }
  [data-theme="light"] body {
    background-image:
      repeating-linear-gradient(0deg, rgba(28,32,41,0.045) 0 1px, transparent 1px 32px),
      repeating-linear-gradient(90deg, rgba(28,32,41,0.045) 0 1px, transparent 1px 32px);
  }
  [data-theme="light"] .nav { background: rgba(245, 238, 219, 0.78); }
  [data-theme="light"] ::selection { color: var(--ink); }
  /* Hero brightened in light theme */
  [data-theme="light"] .hero-bg {
    filter: saturate(1.05) brightness(1.15) contrast(0.95);
  }
  [data-theme="light"] .hero-title {
    text-shadow: 0 2px 24px rgba(245,238,219,0.9);
  }
  [data-theme="light"] .badge {
    background: rgba(245,238,219,0.55);
    color: var(--paper);
  }
  [data-theme="light"] .hero-cta-ghost {
    background: rgba(245,238,219,0.55);
    color: var(--paper);
  }
  [data-theme="light"] .gallery figure figcaption {
    background: rgba(28,32,41,0.72);
  }
  [data-theme="light"] .feature:hover { background: rgba(200,57,46,0.06); }
  [data-theme="light"] .step { background: var(--ink-2); }
  /* Pixel sun (light mode) */
  [data-theme="light"] .pixel-moon {
    color: var(--cinnabar);
    filter: drop-shadow(0 0 24px rgba(200,57,46,0.35));
  }
  /* Stamp dual-character */
  .stamp .ch-light { display: none; }
  [data-theme="light"] .stamp .ch-dark { display: none; }
  [data-theme="light"] .stamp .ch-light { display: grid; place-items: center; width: 100%; height: 100%; }
  [data-theme="light"] .stamp {
    background: rgba(200,57,46,0.14);
    box-shadow: 0 8px 30px rgba(200,57,46,0.18);
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }

  body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--paper);
    background: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-wrap: pretty;
    /* faint pixel grid */
    background-image:
      repeating-linear-gradient(0deg, rgba(237,230,211,0.035) 0 1px, transparent 1px 32px),
      repeating-linear-gradient(90deg, rgba(237,230,211,0.035) 0 1px, transparent 1px 32px);
  }

  a { color: inherit; text-decoration: none; }
  img { display: block; max-width: 100%; }

  ::selection { background: var(--cinnabar); color: var(--paper); }

  /* ------------- Layout ------------- */
  .container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
  }

  /* ------------- Nav ------------- */
  .nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(14, 15, 19, 0.72);
    border-bottom: 1px solid var(--line);
  }
  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
  }
  .brand {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.16em;
    line-height: 1;
  }
  .brand small {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    color: var(--paper-dim);
    letter-spacing: 0.28em;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: var(--paper-dim);
    transition: color 200ms var(--ease);
  }
  .nav-links a::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--cinnabar);
    transition: width 240ms var(--ease);
  }
  .nav-links a:hover,
  .nav-links a.active {
    color: var(--paper);
  }
  .nav-links a:hover::before,
  .nav-links a.active::before {
    width: 18px;
  }
  .nav-sep {
    width: 3px;
    height: 3px;
    background: var(--paper-dim);
    opacity: 0.4;
    margin: 0 2px;
  }
  .theme-toggle {
    width: 36px;
    height: 36px;
    margin-left: 10px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--paper-dim);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    font-family: var(--font-mono);
    transition: color 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease);
  }
  .theme-toggle:hover { color: var(--gold); border-color: var(--gold); transform: rotate(18deg); }
  .theme-toggle .ic-sun,
  .theme-toggle .ic-moon { display: none; }
  .theme-toggle .ic-moon { display: inline; }
  [data-theme="light"] .theme-toggle .ic-moon { display: none; }
  [data-theme="light"] .theme-toggle .ic-sun { display: inline; }

  /* ------------- Hero ------------- */
  .hero {
    position: relative;
    padding: clamp(80px, 14vh, 160px) 0 clamp(96px, 16vh, 180px);
    overflow: hidden;
    isolation: isolate;
  }
  .hero-bg {
    position: absolute;
    inset: -4%;
    z-index: -2;
    background-image: url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    filter: saturate(0.9) brightness(0.55) contrast(1.05);
    animation: kenburns 24s ease-in-out infinite alternate;
  }
  @keyframes kenburns {
    from { transform: scale(1.02) translate(0, 0); }
    to   { transform: scale(1.08) translate(-1%, -1%); }
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(180deg, var(--ink-fade-1) 0%, var(--ink-fade-2) 60%, var(--ink) 100%),
      radial-gradient(ellipse at 30% 40%, var(--hero-tint), transparent 55%);
    pointer-events: none;
  }
  .hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
  }
  @media (min-width: 960px) {
    .hero-inner { grid-template-columns: 1.2fr 0.8fr; gap: 80px; }
  }

  .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.28em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 32px;
  }
  .hero-eyebrow::before {
    content: "";
    width: 32px;
    height: 1px;
    background: var(--gold);
  }

  .hero-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(56px, 9vw, 128px);
    line-height: 1.02;
    letter-spacing: 0.12em;
    margin: 0 0 28px;
    color: var(--paper);
    text-shadow: 0 2px 30px rgba(0,0,0,0.55);
  }
  .hero-title .no {
    color: var(--gold);
    font-weight: 400;
    font-style: italic;
    padding: 0 0.04em;
  }

  .hero-sub {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(18px, 2vw, 22px);
    color: var(--paper-dim);
    max-width: 36ch;
    line-height: 1.8;
    margin: 0 0 40px;
    letter-spacing: 0.04em;
  }

  .hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
  }
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--paper);
    border: 1px solid var(--line-strong);
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
  }
  .badge .dot {
    width: 6px;
    height: 6px;
    background: var(--jade);
    box-shadow: 0 0 0 3px rgba(92,138,107,0.18);
    animation: pulse 2.4s infinite;
  }
  @keyframes pulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.35; }
  }
  .badge.gold { color: var(--gold); border-color: rgba(200,169,106,0.4); }

  /* Hero CTA */
  .hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--cinnabar);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.24em;
    border: 1px solid var(--cinnabar);
    transition: all 220ms var(--ease);
    cursor: pointer;
  }
  .hero-cta:hover {
    background: var(--cinnabar-deep);
    transform: translateY(-2px);
  }
  .hero-cta .arrow {
    display: inline-block;
    transition: transform 220ms var(--ease);
  }
  .hero-cta:hover .arrow { transform: translateX(4px); }
  .hero-cta-ghost {
    display: inline-flex;
    align-items: center;
    padding: 16px 28px;
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.24em;
    border: 1px solid var(--line-strong);
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
    transition: all 220ms var(--ease);
  }
  .hero-cta-ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
  }
  .hero-cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
  }

  /* Scroll hint */
  .scroll-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--paper-dim);
    writing-mode: vertical-rl;
    padding-bottom: 44px;
    z-index: 3;
  }
  .scroll-hint::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 1px;
    height: 36px;
    background: var(--gold);
    transform-origin: top;
    animation: scrollLine 2.2s var(--ease) infinite;
  }
  @keyframes scrollLine {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    50.01% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
  }

  /* Hero right — stamp & pixel moon */
  .hero-art {
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 420px;
    justify-self: center;
    width: 100%;
  }
  .stamp {
    position: absolute;
    right: 2%;
    bottom: 10%;
    z-index: 2;
    width: 140px;
    height: 140px;
    border: 3px solid var(--cinnabar);
    display: grid;
    place-items: center;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 88px;
    color: var(--cinnabar);
    transform: rotate(-6deg);
    background: rgba(200,57,46,0.10);
    letter-spacing: 0;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  }
  .stamp::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid var(--cinnabar);
  }
  .pixel-moon {
    position: absolute;
    right: 14%;
    top: 50%;
    transform: translateY(-50%);
    width: 240px;
    height: 240px;
    opacity: 0.9;
    color: var(--gold);
    filter: drop-shadow(0 0 18px rgba(200,169,106,0.35));
  }
  .pixel-moon span {
    background: currentColor;
    /* left/top/width/height 由 JS 设置 */
  }
  .hero-art-lines {
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
    opacity: 0.5;
  }

  /* falling pixels */
  .falling {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
  }
  .falling i {
    position: absolute;
    top: -20px;
    width: 6px;
    height: 6px;
    background: var(--gold);
    opacity: 0.18;
    animation: fall linear infinite;
  }
  @keyframes fall {
    to { transform: translateY(110vh); opacity: 0; }
  }

  /* ------------- Section ------------- */
  section.band {
    padding: clamp(80px, 12vh, 140px) 0;
    border-top: 1px solid var(--line);
    position: relative;
  }
  .section-head {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 56px;
  }
  .section-idx {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.28em;
    color: var(--gold);
  }
  .section-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(32px, 4vw, 52px);
    margin: 0;
    letter-spacing: 0.04em;
  }
  .section-desc {
    color: var(--paper-dim);
    max-width: 52ch;
    margin: 12px 0 0;
    line-height: 1.8;
  }

  /* ------------- Gallery ------------- */
  .gallery {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 160px;
    gap: 12px;
  }
  .gallery figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--ink-2);
  }
  .gallery figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 800ms var(--ease), filter 400ms var(--ease);
    filter: saturate(0.9) brightness(0.92);
  }
  .gallery figure:hover img {
    transform: scale(1.06);
    filter: saturate(1.05) brightness(1);
  }
  .gallery figure figcaption {
    position: absolute;
    left: 16px;
    bottom: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--paper);
    background: rgba(26,30,42,0.7);
    backdrop-filter: blur(4px);
    padding: 6px 10px;
    border-left: 2px solid var(--cinnabar);
  }
  .g-a { grid-column: span 7; grid-row: span 2; }
  .g-b { grid-column: span 5; grid-row: span 1; }
  .g-c { grid-column: span 5; grid-row: span 1; }
  .g-d { grid-column: span 4; grid-row: span 1; }
  .g-e { grid-column: span 8; grid-row: span 1; }
  @media (max-width: 760px) {
    .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
    .g-a, .g-b, .g-c, .g-d, .g-e { grid-column: span 2; grid-row: span 1; }
    .g-a { grid-row: span 2; }
  }

  /* ------------- Feature cards ------------- */
  .features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0;
    border: 1px solid var(--line);
  }
  .feature {
    padding: 40px 32px 48px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    position: relative;
    transition: background 260ms var(--ease), transform 260ms var(--ease);
  }
  .feature:last-child { border-right: 1px solid var(--line); }
  .feature:hover {
    background: rgba(200,57,46,0.04);
    transform: translateY(-2px);
  }
  .feature:hover .feature-num { color: var(--cinnabar); }
  .feature-num {
    font-family: var(--font-pixel);
    font-size: 48px;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 24px;
    transition: color 260ms var(--ease);
  }
  .feature h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 14px;
    letter-spacing: 0.04em;
  }
  .feature p {
    color: var(--paper-dim);
    line-height: 1.85;
    margin: 0;
    font-size: 14px;
  }

  /* ------------- Verse band ------------- */
  .verse {
    text-align: center;
    padding: clamp(100px, 16vh, 180px) 0;
    background:
      radial-gradient(ellipse at 50% 50%, rgba(200,57,46,0.06), transparent 60%),
      linear-gradient(180deg, var(--ink) 0%, var(--verse-band) 28%, var(--verse-band) 72%, var(--ink) 100%);
    position: relative;
  }
  .verse::before,
  .verse::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(60%, 480px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  }
  .verse::before { top: 0; }
  .verse::after { bottom: 0; }
  .verse p {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.7;
    letter-spacing: 0.24em;
    color: var(--paper);
    margin: 0;
    font-weight: 400;
  }
  .verse p span { color: var(--cinnabar); }
  .verse small {
    display: block;
    margin-top: 32px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.28em;
    color: var(--gold);
  }

  /* ------------- Steps ------------- */
  .steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
  }
  @media (min-width: 720px) {
    .steps { grid-template-columns: repeat(3, 1fr); }
  }
  .step {
    background: var(--ink);
    padding: 40px 32px;
  }
  .step-num {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.28em;
    color: var(--cinnabar);
    margin-bottom: 20px;
  }
  .step h4 {
    font-family: var(--font-serif);
    font-size: 22px;
    margin: 0 0 12px;
    font-weight: 600;
  }
  .step p {
    color: var(--paper-dim);
    line-height: 1.8;
    font-size: 14px;
    margin: 0;
  }
  .step code {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gold);
    background: rgba(200,169,106,0.08);
    padding: 2px 8px;
    border: 1px solid rgba(200,169,106,0.2);
    margin-top: 8px;
  }

  /* ------------- Footer ------------- */
  footer {
    padding: 96px 0 40px;
    border-top: 1px solid var(--line);
    background: var(--ink);
    position: relative;
  }
  footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 2px;
    background: var(--cinnabar);
  }
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
    margin-bottom: 56px;
  }
  @media (min-width: 720px) {
    .footer-grid {
      grid-template-columns: 2.2fr 1fr 1.2fr;
      gap: 56px;
    }
  }
  footer h5 {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.42em;
    color: var(--paper);
    margin: 0 0 22px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  footer h5::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--cinnabar);
    flex-shrink: 0;
  }
  footer p {
    color: var(--paper-dim);
    font-size: 14px;
    line-height: 1.9;
    margin: 0;
  }
  footer ul { list-style: none; margin: 0; padding: 0; }
  footer li {
    color: var(--paper-dim);
    font-size: 14px;
    line-height: 2;
  }
  footer a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 200ms var(--ease);
  }
  footer a::before {
    content: "→";
    color: var(--gold);
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 220ms var(--ease), max-width 220ms var(--ease), margin-right 220ms var(--ease);
  }
  footer a:hover { color: var(--paper); }
  footer a:hover::before {
    opacity: 1;
    max-width: 20px;
    margin-right: 8px;
  }
  .footer-grid > div:first-child p {
    color: var(--paper);
    position: relative;
    padding-left: 18px;
    max-width: 44ch;
  }
  .footer-grid > div:first-child p::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--cinnabar);
  }
  .footer-grid > div:last-child li:first-child {
    font-family: var(--font-serif);
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--paper);
    margin-bottom: 10px;
    line-height: 1.4;
  }
  .footer-grid > div:last-child li:not(:first-child) {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.28em;
    color: var(--gold);
    text-transform: uppercase;
    line-height: 1.7;
  }
  .qq-card {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    color: var(--paper);
  }
  .qq-card span:first-child {
    font-size: 11px;
    letter-spacing: 0.24em;
    color: var(--paper-dim);
  }
  .qq-card span:last-child {
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--cinnabar);
  }

  .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--paper-dim);
    flex-wrap: wrap;
    gap: 16px;
  }
  .footer-bottom .pixel-row {
    display: inline-flex;
    gap: 2px;
  }
  .footer-bottom .pixel-row i {
    width: 6px; height: 6px; background: var(--gold); opacity: 0.4;
  }

  /* ------------- Reveal animation ------------- */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  }
  .reveal.in {
    opacity: 1;
    transform: none;
  }

  /* 主题切换时的全局过渡:仅在 <html class="theme-switching"> 期间激活
     用 :not(#moon):not(#moon *) 排除像素月亮,它有自己的节奏 */
  :root.theme-switching *:not(#moon):not(#moon *),
  :root.theme-switching *:not(#moon):not(#moon *)::before,
  :root.theme-switching *:not(#moon):not(#moon *)::after {
    transition:
      background-color 320ms ease,
      background-image 320ms ease,
      color 320ms ease,
      border-color 320ms ease,
      box-shadow 320ms ease,
      filter 320ms ease !important;
  }
  /* :root 上对已注册 @property 变量做 320ms 插值
     → 所有 var()-based gradient(hero::before、verse)随之逐帧重绘 */
  :root.theme-switching {
    transition:
      --ink 320ms ease,
      --ink-2 320ms ease,
      --ink-3 320ms ease,
      --paper 320ms ease,
      --paper-dim 320ms ease,
      --ink-fade-1 320ms ease,
      --ink-fade-2 320ms ease,
      --hero-tint 320ms ease,
      --verse-band 320ms ease !important;
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation: none !important;
      transition: none !important;
    }
    .reveal { opacity: 1; transform: none; }
  }


  /* Back-to-top floating button */
  .back-to-top {
    position: fixed;
    right: clamp(16px, 3vw, 28px);
    bottom: clamp(16px, 3vw, 28px);
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    background: var(--ink-2);
    color: var(--paper-dim);
    font-family: var(--font-mono);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition:
      opacity 280ms var(--ease),
      transform 280ms var(--ease),
      color 200ms var(--ease),
      border-color 200ms var(--ease),
      background 200ms var(--ease);
    z-index: 90;
    display: grid;
    place-items: center;
  }
  .back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .back-to-top:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: var(--ink-3);
  }
  @media (max-width: 640px) {
    .back-to-top { width: 40px; height: 40px; font-size: 18px; }
  }

  /* Mobile nav */
  @media (max-width: 680px) {
    .nav-links a { padding: 8px 10px; font-size: 13px; letter-spacing: 0.08em; }
    .brand { font-size: 17px; }
    .brand small { display: none; }
  }
  /* Intro veil (first-visit animation) */
  .intro-veil {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0E0F13;
    display: grid;
    place-items: center;
    transition: opacity 800ms var(--ease);
  }
  [data-theme="light"] .intro-veil { background: #F5EEDB; }
  .intro-veil.gone { opacity: 0; pointer-events: none; }
  .intro-inner { text-align: center; padding: 0 24px; }
  .intro-brand {
    font-family: var(--font-serif);
    font-size: clamp(40px, 6vw, 72px);
    letter-spacing: 0.24em;
    color: var(--paper);
    display: inline-flex;
    gap: 0.08em;
    justify-content: center;
    margin-bottom: 20px;
  }
  .intro-brand span {
    display: inline-block;
    opacity: 0;
    transform: translateY(14px);
    animation: introChar 640ms var(--ease) forwards;
  }
  .intro-brand span:nth-child(1) { animation-delay: 120ms; }
  .intro-brand span:nth-child(2) { animation-delay: 280ms; color: var(--cinnabar); }
  .intro-brand span:nth-child(3) { animation-delay: 440ms; color: var(--gold); font-style: italic; font-weight: 400; }
  .intro-brand span:nth-child(4) { animation-delay: 600ms; }
  @keyframes introChar { to { opacity: 1; transform: none; } }
  .intro-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.42em;
    color: var(--paper-dim);
    opacity: 0;
    animation: introFade 600ms var(--ease) 900ms forwards;
  }
  .intro-bar {
    width: 200px;
    height: 1px;
    background: var(--line);
    margin: 24px auto 14px;
    overflow: hidden;
    opacity: 0;
    animation: introFade 300ms var(--ease) 1100ms forwards;
  }
  .intro-bar i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--gold);
    animation: introBar 1200ms var(--ease) 1200ms forwards;
  }
  @keyframes introBar { to { width: 100%; } }
  .intro-status {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.38em;
    color: var(--gold);
    opacity: 0;
    animation: introFade 400ms var(--ease) 1300ms forwards;
  }
  @keyframes introFade { to { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) {
    .intro-veil { display: none !important; }
  }

  /* Mobile refinements */
  @media (max-width: 640px) {
    .hero-art { max-width: 320px; }
    .stamp {
      width: 96px;
      height: 96px;
      font-size: 58px;
      border-width: 2px;
      right: 2%;
      bottom: 8%;
    }
    .stamp::before { inset: 4px; }
    .pixel-moon {
      width: 160px;
      height: 160px;
      right: 18%;
      gap: 1px;
    }
  }
  @media (max-width: 600px) {
    .footer-bottom {
      justify-content: center;
      text-align: center;
      flex-direction: column;
    }
    .footer-bottom .pixel-row { order: -1; }
  }
  @media (max-width: 520px) {
    .nav-sep { display: none; }
    .nav-links { gap: 0; }
    .nav-links a { padding: 6px 8px; font-size: 12px; letter-spacing: 0.06em; }
    .theme-toggle {
      width: 32px;
      height: 32px;
      margin-left: 6px;
      font-size: 13px;
    }
    .brand { font-size: 16px; letter-spacing: 0.12em; }
  }
