:root {
  --bg: #0c0b0a;
  --bg-2: #141210;
  --ink: #f4eadc;
  --mute: #8d8478;
  --faint: #5c564e;
  --red: #e23d28;
  --line: rgba(244, 234, 220, .12);
  --ease: cubic-bezier(.19, 1, .22, 1);
  --serif: "Songti SC", "STSong", "SimSun", "PMingLiU", "Times New Roman", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", "Sarasa Mono SC", Consolas, monospace;
  color-scheme: dark;
}
[data-theme="paper"] {
  --bg: #efe6d6;
  --bg-2: #e6dcc8;
  --ink: #1a1612;
  --mute: #6a6258;
  --faint: #9a9184;
  --line: rgba(26, 22, 18, .12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--red); color: #fff; }

.grain {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 40; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 60;
  background: var(--red);
}
.wrap { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }

.top {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.sign { display: flex; align-items: center; gap: 10px; letter-spacing: .2em; }
.sign em {
  font-style: normal; font-family: var(--serif);
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--red); color: var(--red); font-size: 16px;
}
.sign span { font-size: 13px; }
.menu { display: flex; gap: 28px; font-size: 13px; letter-spacing: .18em; }
.menu a { color: var(--mute); position: relative; }
.menu a.on, .menu a:hover { color: var(--ink); }
.menu a.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: var(--red);
}
.top-right { justify-self: end; display: flex; gap: 12px; align-items: center; }
.ghost {
  font-size: 12px; letter-spacing: .16em; color: var(--mute);
  border: 1px solid var(--line); padding: 6px 10px;
}
.ghost:hover { color: var(--ink); border-color: var(--ink); }
.burger { display: none; width: 36px; height: 36px; flex-direction: column; justify-content: center; gap: 6px; }
.burger span { display: block; height: 1px; background: var(--ink); }

.splash { padding: 8vh 0 0; min-height: 86vh; display: flex; flex-direction: column; }
.splash-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: end; flex: 1; padding-bottom: 48px; }
.rule-label { font-size: 12px; letter-spacing: .32em; color: var(--red); margin: 0 0 18px; }
.name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(72px, 14vw, 168px);
  line-height: .88;
  letter-spacing: -.06em;
  display: flex; gap: .08em;
}
.name span { display: inline-block; animation: rise .9s var(--ease) both; }
.name span:nth-child(2) { animation-delay: .08s; }
.name span:nth-child(3) { animation-delay: .16s; color: var(--red); }
.manifesto { font-size: 20px; max-width: 18em; margin: 28px 0 20px; }
.count { color: var(--mute); display: flex; align-items: center; gap: 14px; font-size: 14px; }
.count b { color: var(--ink); font-size: 22px; font-family: var(--serif); }
.count i { width: 24px; height: 1px; background: var(--line); display: block; }
.splash-side { color: var(--mute); font-size: 15px; padding-bottom: 12px; }
.splash-side p { margin-top: 0; }
.text-link { color: var(--red); letter-spacing: .08em; font-size: 13px; border-bottom: 1px solid var(--red); }

.ticker {
  border-top: 1px solid var(--line);
  overflow: hidden; padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex; gap: 28px; width: max-content;
  animation: marquee 36s linear infinite;
  letter-spacing: .28em; font-size: 12px; color: var(--faint);
}
.ticker i { font-style: normal; color: var(--red); }

.band { padding: 88px 0; border-top: 1px solid var(--line); }
.band-head { display: grid; grid-template-columns: 48px 1fr; gap: 8px 20px; margin-bottom: 36px; align-items: baseline; }
.band-head span { font-family: var(--mono); color: var(--red); font-size: 12px; }
.band-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4vw, 48px); grid-column: 2; }
.band-head p { grid-column: 2; margin: 0; color: var(--mute); max-width: 42em; }

.index { display: grid; }
.row {
  display: grid;
  grid-template-columns: 64px 1.4fr .8fr 90px 70px;
  gap: 16px; align-items: center;
  padding: 22px 8px;
  border-top: 1px solid var(--line);
  transition: background .35s var(--ease), padding .35s var(--ease);
  position: relative;
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--red); transition: width .35s var(--ease);
}
.row:hover { padding-left: 18px; }
.row:hover::before { width: 3px; }
.row-no { font-family: var(--mono); color: var(--red); font-size: 12px; }
.row-name strong { display: block; font-size: 22px; font-family: var(--serif); font-weight: 500; }
.row-name small { color: var(--mute); font-size: 13px; }
.row-meta, .row-state { color: var(--mute); font-size: 13px; }
.row.is-wait { opacity: .55; }
.row.is-wait:hover { opacity: 1; }
.row-go { letter-spacing: .16em; font-size: 12px; color: var(--red); text-align: right; }

.author-spread .author-body { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.huge { font-family: var(--serif); font-size: clamp(36px, 5vw, 56px); line-height: 1.15; margin: 0 0 16px; }
.muted { color: var(--mute); }
.creed { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.creed li { border-top: 1px solid var(--line); padding-top: 14px; color: var(--mute); }
.creed em { font-style: normal; color: var(--red); font-family: var(--mono); font-size: 12px; margin-right: 10px; }

.page-head { padding: 10vh 0 24px; }
.page-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(48px, 8vw, 88px); margin: 0 0 12px; letter-spacing: -.04em; }

.product-hero { padding: 10vh 0 32px; }
.product-hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(48px, 7vw, 92px); margin: 0 0 16px; letter-spacing: -.04em; }
.lead { font-size: 18px; color: var(--mute); max-width: 36em; }
.product-bar { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; color: var(--mute); font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  background: var(--red); color: #fff; letter-spacing: .18em; font-size: 12px;
  transition: transform .2s var(--ease), filter .2s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-block { width: 100%; }

.lines { display: grid; }
.line {
  display: grid; grid-template-columns: 56px 1fr; gap: 16px;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.line em { font-family: var(--mono); color: var(--red); font-style: normal; }
.line h3 { margin: 0 0 6px; font-size: 20px; font-family: var(--serif); font-weight: 500; }
.line p { margin: 0; color: var(--mute); }

.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.path li { border-top: 1px solid var(--red); padding-top: 16px; }
.path b { display: block; font-family: var(--mono); color: var(--red); font-size: 12px; margin-bottom: 8px; }
.path p { color: var(--mute); margin: 8px 0 0; }

.close { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.close p { font-family: var(--serif); font-size: 28px; margin: 0; }

.blank { min-height: 70vh; display: grid; align-content: center; gap: 16px; padding: 8vh 0; }
.blank h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 7vw, 72px); margin: 0; }
.wait-line { letter-spacing: .2em; color: var(--red); font-size: 12px; }

.colophon { border-top: 1px solid var(--line); padding: 40px 0 28px; color: var(--mute); font-size: 13px; }
.colophon-grid { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 24px; align-items: start; }
.colophon em {
  font-style: normal; font-family: var(--serif); color: var(--red);
  border: 1px solid var(--red); width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 10px;
}
.colophon a { display: block; margin-bottom: 6px; }
.colophon a:hover { color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  background: var(--red); color: #fff; padding: 10px 16px; letter-spacing: .12em; font-size: 12px;
  opacity: 0; pointer-events: none; z-index: 70; transition: .35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(16px); animation: rise .8s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }

.admin { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; background: var(--bg); color: var(--ink); }
.aside { border-right: 1px solid var(--line); padding: 24px 16px; }
.aside a { display: block; padding: 10px 0; color: var(--mute); letter-spacing: .12em; font-size: 13px; }
.aside a.is-on, .aside a:hover { color: var(--red); }
.admin-main { padding: 28px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field span { font-size: 12px; color: var(--mute); letter-spacing: .12em; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--red); }
.panel { border: 1px solid var(--line); padding: 22px; }
.flash { padding: 10px 12px; margin-bottom: 12px; }
.flash-ok { color: #7dcea0; }
.flash-err { color: var(--red); }
.tag { font-size: 11px; letter-spacing: .12em; }
.tag-live { color: var(--red); }
.tag-coming { color: var(--mute); }
.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--bg); color: var(--ink); }
.login-card { width: min(400px, calc(100% - 32px)); }
.kicker { color: var(--red); letter-spacing: .28em; font-size: 12px; }
.admin h1 { font-family: var(--serif); font-weight: 500; letter-spacing: -.04em; margin: 0 0 8px; }
.admin .admin-main > .muted { margin-top: 0; margin-bottom: 28px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat { border: 1px solid var(--line); padding: 18px 16px; }
.stat b { display: block; font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.1; }
.stat span { color: var(--mute); font-size: 12px; letter-spacing: .16em; }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dash-card { display: block; transition: border-color .3s var(--ease), padding-left .3s var(--ease); }
.dash-card:hover { border-color: var(--red); }
.dash-card h2 { font-family: var(--serif); font-weight: 500; margin: 6px 0 8px; }
.link-row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.mint-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.filter-row { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-row input, .filter-row select {
  padding: 8px 10px; border: 1px solid var(--line); background: transparent; color: var(--ink);
}
.inline-form input { width: 100%; padding: 6px 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.extend-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.extend-form input[type="number"] {
  width: 64px; padding: 6px 8px; border: 1px solid var(--line); background: transparent; color: var(--ink);
}
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.map-panel { display: grid; grid-template-columns: 1.6fr .8fr; gap: 24px; align-items: start; }
.china-map { position: relative; min-height: 420px; border: 1px solid var(--line); overflow: hidden; }
.china-map svg { width: 100%; height: auto; display: block; opacity: .9; }
.china-land { fill: rgba(226, 61, 40, .12); stroke: var(--red); stroke-width: 2; }
#dots { position: absolute; inset: 0; }
.dot {
  position: absolute; transform: translate(-50%, -50%);
  background: none; padding: 0; color: var(--ink);
}
.dot i {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 6px rgba(226, 61, 40, .18);
  margin: 0 auto 4px;
}
.dot span { font-size: 11px; letter-spacing: .08em; color: var(--ink); }
.prov-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.prov-list li { border-top: 1px solid var(--line); padding-top: 8px; color: var(--mute); font-size: 13px; }
.prov-list em { font-style: normal; color: var(--red); font-family: var(--mono); margin-right: 10px; }
#mintBox { width: 100%; background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 12px; font-family: var(--mono); font-size: 13px; }

@media (max-width: 860px) {
  .splash-grid, .author-body, .path, .colophon-grid, .admin, .close, .stat-row, .dash-grid, .map-panel, .mint-grid, .link-row { grid-template-columns: 1fr; }
  .row { grid-template-columns: 48px 1fr auto; }
  .row-meta { display: none; }
  .top { grid-template-columns: 1fr auto; }
  .menu {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 16px 28px; gap: 14px;
  }
  .menu.open { display: flex; }
  .burger { display: flex; }
  .name { font-size: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
