:root {
  --paper: #f4efe3;
  --paper-2: #ebe3d0;
  --card: #fffdf7;
  --ink: #2b2925;
  --ink-2: #5e584d;
  --ink-3: #9a917f;
  --line: rgba(60, 50, 30, .12);
  --seal: #b5432c;
  --sage: #7f9670;
  --gold: #b8964f;
  --shadow: 0 1px 2px rgba(60, 45, 20, .06), 0 8px 24px -10px rgba(60, 45, 20, .22);
  --shadow-lg: 0 2px 4px rgba(60, 45, 20, .06), 0 24px 48px -16px rgba(60, 45, 20, .32);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "SimSun", "宋体", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "BiauKai", var(--serif);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 190px; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 255, 255, .75), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(214, 198, 160, .35), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: rgba(181, 67, 44, .18); }

.arrow { display: inline-block; transition: transform .35s var(--ease); }

/* 入场动画 */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 50px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: 16px; letter-spacing: .12em; transition: all .3s var(--ease);
}
.btn.primary { background: var(--ink); color: #f8f3e6; box-shadow: 0 10px 24px -12px rgba(30, 25, 15, .7); }
.btn.primary:hover { background: #1a1815; transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(30, 25, 15, .8); }
.btn.primary:hover .arrow { transform: translateX(4px); }
.btn.ghost { border-color: var(--line); color: var(--ink-2); background: transparent; }
.btn.ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn.block { width: 100%; }

/* ---------------- 欢迎页 ---------------- */
.page-welcome { overflow-x: hidden; }
.dust { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.welcome-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ring {
  position: absolute; left: 50%; top: 42%; border-radius: 50%;
  border: 1px solid rgba(120, 100, 60, .10); transform: translate(-50%, -50%);
  animation: breathe 9s ease-in-out infinite;
}
.r1 { width: 520px; height: 520px; }
.r2 { width: 820px; height: 820px; animation-delay: -3s; border-style: dashed; border-color: rgba(120, 100, 60, .07); }
.r3 { width: 1180px; height: 1180px; animation-delay: -6s; }
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.04); opacity: .6; } }

.welcome {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 22px calc(40px + env(safe-area-inset-bottom)); text-align: center;
}
.welcome-years {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--serif); font-size: 15px; letter-spacing: .4em; color: var(--ink-3);
}
.welcome-years i { width: 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--ink-3), transparent); }
.welcome-title {
  margin: 22px 0 18px; font-family: var(--serif); font-weight: 700;
  font-size: clamp(46px, 11vw, 88px); letter-spacing: .14em; line-height: 1.15; color: var(--ink);
  text-indent: .14em;
}
.welcome-title span {
  display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(10px);
  animation: ink-in 1.2s var(--ease) forwards; animation-delay: calc(.3s + var(--i) * .16s);
}
@keyframes ink-in { to { opacity: 1; filter: blur(0); transform: none; } }
.welcome-lead { margin: 0 0 38px; font-family: var(--serif); font-size: clamp(15px, 3.8vw, 17px); color: var(--ink-2); line-height: 2; }
.welcome-lead em { font-style: normal; color: var(--seal); border-bottom: 1px solid rgba(181, 67, 44, .35); padding-bottom: 1px; }

.welcome-card {
  width: min(400px, 100%); padding: 30px 28px 24px; text-align: left;
  background: rgba(255, 253, 247, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 22px; box-shadow: var(--shadow-lg);
  position: relative;
}
.welcome-card::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 88px; height: 18px; transform: translateX(-50%) rotate(-2deg);
  background: rgba(200, 186, 150, .55); border-left: 1px dashed rgba(255, 255, 255, .6); border-right: 1px dashed rgba(255, 255, 255, .6);
}
.card-label { display: block; margin: 0 0 6px; font-family: var(--serif); font-size: 15px; color: var(--ink-2); letter-spacing: .1em; }
.card-note { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3); text-align: center; letter-spacing: .04em; }
.card-error { margin: -6px 0 14px; color: var(--seal); font-size: 13.5px; }
.card-actions { display: flex; gap: 10px; margin-top: 22px; }
.card-actions .btn { flex: 1; padding: 0 14px; letter-spacing: .06em; font-size: 15px; }
.welcome-card:has(.card-actions) .card-note { text-align: left; }

.ink-field { position: relative; margin-bottom: 22px; }
.ink-field input {
  width: 100%; height: 64px; border: 0; outline: 0; background: transparent;
  font-family: var(--kai); font-size: 34px; color: var(--ink); letter-spacing: .12em; padding: 0 2px;
}
.ink-field input::placeholder { color: rgba(90, 80, 60, .22); font-size: 26px; }
.ink-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.ink-line {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; z-index: 1;
  background: linear-gradient(90deg, var(--ink), var(--seal));
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.ink-field input:focus ~ .ink-line { transform: scaleX(1); }

.welcome-foot { margin-top: 34px; font-size: 12.5px; color: var(--ink-3); letter-spacing: .15em; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 62px; padding: 0 max(20px, env(safe-area-inset-left)); padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: rgba(244, 239, 227, .78); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: .14em; }
.brand-mark { color: var(--seal); font-size: 14px; }
.me-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 12px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-family: var(--kai); font-size: 16px; color: var(--ink); white-space: nowrap;
}
.me-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 3px rgba(127, 150, 112, .2); }
.back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--serif); font-size: 16px; color: var(--ink-2); letter-spacing: .08em; }
.back:hover { color: var(--ink); }
.back:hover .arrow { transform: translateX(-3px); }
.topbar-no { position: absolute; left: 50%; transform: translateX(-50%); font-family: var(--serif); font-size: 13px; color: var(--ink-3); letter-spacing: .2em; }

/* ---------------- 名单页 ---------------- */
.list-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px; }
.list-hero { padding: 56px 0 34px; text-align: center; }
.eyebrow { margin: 0 0 14px; font-family: var(--serif); font-size: 13px; letter-spacing: .38em; color: var(--ink-3); }
.list-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 6.4vw, 48px); letter-spacing: .08em; font-weight: 700; }
.hl { font-family: var(--kai); font-weight: 400; color: var(--seal); position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: -4%; right: -4%; bottom: .06em; height: .32em; background: rgba(181, 67, 44, .12); z-index: -1; border-radius: 2px; }
.lead { margin: 16px auto 0; max-width: 560px; font-family: var(--serif); color: var(--ink-2); font-size: 15.5px; line-height: 2; }
br.pc { display: none; }
@media (min-width: 720px) { br.pc { display: inline; } }

.feature-card {
  display: grid; grid-template-columns: 240px 1fr; overflow: hidden; margin: 8px 0 36px;
  background: var(--card); border-radius: 22px; border: 1px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-card:hover .feature-img { transform: scale(1.06); }
.feature-card:hover .arrow { transform: translateX(4px); }
.feature-img { min-height: 200px; background: #dfe3cf center 18% / cover no-repeat; transition: transform 1.2s var(--ease); }
.feature-body { padding: 30px 32px; display: flex; flex-direction: column; justify-content: center; }
.feature-tag {
  align-self: flex-start; font-family: var(--serif); font-size: 12px; letter-spacing: .3em; color: var(--seal);
  border: 1px solid rgba(181, 67, 44, .45); padding: 2px 6px 2px 10px; border-radius: 4px; transform: rotate(-3deg);
}
.feature-body h2 { margin: 12px 0 6px; font-family: var(--serif); font-size: 28px; letter-spacing: .2em; }
.feature-body p { margin: 0 0 16px; font-family: var(--kai); font-size: 17px; color: var(--ink-2); }
.feature-link { font-size: 14px; color: var(--ink); letter-spacing: .1em; }

.toolbar {
  position: sticky; top: calc(62px + env(safe-area-inset-top)); z-index: 10;
  display: flex; flex-direction: column; gap: 12px; padding: 14px 0 12px; margin-bottom: 8px;
  background: linear-gradient(var(--paper) 78%, rgba(244, 239, 227, 0));
}
.search { position: relative; }
.search svg { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.search input {
  width: 100%; height: 50px; padding: 0 20px 0 48px; border-radius: 999px; outline: 0;
  border: 1px solid var(--line); background: var(--card); font-size: 16px; color: var(--ink);
  box-shadow: 0 1px 2px rgba(60, 45, 20, .04); transition: border-color .3s, box-shadow .3s;
  -webkit-appearance: none; appearance: none;
}
.search input:focus { border-color: rgba(60, 50, 30, .3); box-shadow: 0 0 0 4px rgba(184, 150, 79, .15); }
.search input::placeholder { color: var(--ink-3); }
.alpha { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.alpha::-webkit-scrollbar { display: none; }
.alpha a {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font-family: var(--serif); font-size: 14px; color: var(--ink-2); border: 1px solid transparent; transition: all .25s;
}
.alpha a:hover, .alpha a.active { background: var(--ink); color: var(--paper); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px 18px; padding-top: 18px; }
.group-anchor { position: absolute; top: -20px; left: 0; }
.name-card .letter { position: absolute; top: 4px; right: 12px; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1; color: var(--gold); opacity: .85; }
.name-card {
  --tone: #cfd9c3;
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 150px; padding: 26px 14px 18px; text-align: center;
  background: var(--card); border-radius: 6px 6px 16px 6px; box-shadow: var(--shadow);
  transform: rotate(var(--r, 0deg)); transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  background-image:
    linear-gradient(transparent 0 calc(100% - 1px), rgba(120, 140, 170, .10) 0),
    linear-gradient(90deg, transparent 0 22px, rgba(181, 67, 44, .10) 22px 23px, transparent 23px);
  background-size: 100% 28px, 100% 100%;
  background-position: 0 10px, 0 0;
}
.name-card::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--card) 50%, var(--paper-2) 50%); border-radius: 0 0 16px 0;
  box-shadow: -2px -2px 4px rgba(60, 45, 20, .06);
}
.name-card:hover { transform: rotate(0) translateY(-6px); box-shadow: var(--shadow-lg); z-index: 2; }
.name-card:active { transform: scale(.98); }
.tape {
  position: absolute; top: -8px; left: 50%; width: 64px; height: 18px; transform: translateX(-50%) rotate(calc(var(--r) * -3));
  background: var(--tone); opacity: .8; mix-blend-mode: multiply;
  -webkit-mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent 0);
}
.tone-sage { --tone: #c8d6b9; } .tone-rose { --tone: #ecc9c1; } .tone-sky { --tone: #bfd3e3; }
.tone-sand { --tone: #e8d7ae; } .tone-lilac { --tone: #d5cbe3; } .tone-mint { --tone: #b9ddd2; }
.name-card .no { position: absolute; top: 10px; left: 30px; font-family: var(--serif); font-size: 11px; color: var(--ink-3); letter-spacing: .1em; }
.name-card .name { font-family: var(--kai); font-size: 32px; line-height: 1.25; letter-spacing: .1em; color: var(--ink); text-indent: .1em; }
.name-card .py { margin-top: 6px; font-size: 11.5px; letter-spacing: .14em; color: var(--ink-3); text-transform: capitalize; }
.name-card .alias { margin-top: 2px; font-size: 11.5px; color: var(--ink-3); font-family: var(--serif); }
.badge {
  display: inline-block; font-family: var(--serif); font-size: 12px; letter-spacing: .15em; color: var(--seal);
  border: 1.5px solid var(--seal); border-radius: 4px; padding: 1px 4px 1px 7px; transform: rotate(-8deg); opacity: .85;
}
.name-card .badge { position: absolute; top: 10px; right: 10px; }
.name-card.is-me { box-shadow: 0 0 0 2px rgba(181, 67, 44, .35), var(--shadow); }
.seen-mark { position: absolute; bottom: 8px; left: 30px; font-size: 11px; color: var(--sage); letter-spacing: .08em; }
.empty-tip { text-align: center; padding: 50px 0; font-family: var(--serif); color: var(--ink-3); letter-spacing: .1em; }

.site-foot { margin-top: 70px; padding: 30px 0 calc(10px + env(safe-area-inset-bottom)); text-align: center; border-top: 1px solid var(--line); }
.site-foot p { margin: 0; font-family: var(--serif); font-size: 13px; color: var(--ink-3); letter-spacing: .2em; }

.to-top {
  position: fixed; right: 20px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 30;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 18px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: all .35s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------------- 详情页 ---------------- */
.view-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.view-head { text-align: center; padding: 40px 0 26px; }
.view-head h1 { margin: 0; font-family: var(--kai); font-weight: 400; font-size: clamp(40px, 9vw, 60px); letter-spacing: .16em; line-height: 1.2; text-indent: .16em; }
.view-head h1 .badge { font-size: 13px; vertical-align: middle; margin-left: 12px; text-indent: 0; }
.view-head p { margin: 8px 0 0; font-size: 13px; letter-spacing: .24em; color: var(--ink-3); text-transform: capitalize; }

.paper { margin: 0; }
.paper-inner {
  position: relative; padding: 14px; background: var(--card); border-radius: 10px;
  box-shadow: var(--shadow-lg); overflow: hidden; min-height: 180px;
}
.paper-inner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
}
.paper img {
  display: block; width: 100%; height: auto; border-radius: 4px; cursor: zoom-in; position: relative;
  opacity: 0; transition: opacity .8s var(--ease);
}
.paper img.loaded { opacity: 1; }
.img-skeleton {
  position: absolute; inset: 14px; border-radius: 4px;
  background: linear-gradient(100deg, #efe9da 30%, #f8f4ea 50%, #efe9da 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}
.paper img.loaded + .img-skeleton, .paper-inner:has(img.loaded) .img-skeleton { display: none; }
@keyframes shimmer { to { background-position: -300% 0; } }
.paper.portrait { max-width: 720px; margin: 0 auto; }
.paper figcaption { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--ink-3); letter-spacing: .12em; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; }
.pager-btn {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 22px; border-radius: 16px;
  background: var(--card); border: 1px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.pager-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pager-btn small { font-size: 12px; color: var(--ink-3); letter-spacing: .2em; }
.pager-btn > span { font-family: var(--kai); font-size: 22px; letter-spacing: .06em; }
.pager-btn.next { text-align: right; }
.pager-btn.prev:hover .arrow { transform: translateX(-4px); }
.pager-btn.next:hover .arrow { transform: translateX(4px); }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(25, 22, 18, .94);
  display: flex; align-items: center; justify-content: center; animation: fade .3s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-stage { width: 100%; height: 100%; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; }
.lb-stage img { margin: auto; display: block; max-width: none; width: 1800px; height: auto; cursor: zoom-out; }
.lb-close {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14);
  color: #fff; font-size: 26px; line-height: 1; backdrop-filter: blur(6px);
}

/* ---------------- 移动端 ---------------- */
@media (max-width: 640px) {
  .topbar { height: 56px; padding-left: 16px; padding-right: 16px; }
  .toolbar { top: calc(56px + env(safe-area-inset-top)); }
  .brand { font-size: 16px; }
  .topbar-no { display: none; }
  .list-wrap { padding: 0 14px 30px; }
  .list-hero { padding: 38px 0 24px; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-img { min-height: 150px; }
  .feature-body { padding: 22px 22px 24px; }
  .feature-body h2 { font-size: 24px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .name-card { min-height: 128px; }
  .name-card .name { font-size: 28px; }
  .view-wrap { padding: 0 10px 30px; }
  .view-head { padding: 28px 0 18px; }
  .paper-inner { padding: 8px; }
  .img-skeleton { inset: 8px; }
  .pager-btn { padding: 12px 16px; }
  .pager-btn > span { font-size: 19px; }
  .lb-stage img { width: 220vw; }
}
@media (max-width: 360px) {
  .name-card .name { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
