/* OAKEN 的设计系统 —— 自己的站，不用 Tailwind，也不套任何现成框架。
 *
 * 三条原则（对着 owner 那几条意见来的）：
 *   ① **颜色干净**：只有四个色阶 —— 树皮（底）、羊皮纸（字）、一个金（强调）、
 *      一个灰褐（次要文字）。不用第二套棕、不用渐变堆叠、不用赛博滤镜。
 *   ② **排版和源站不一样**：源站是**左侧工具栏 + 密集表格**，我们是**顶栏 + 宽版心**，
 *      大留白、大标题、卡片浮在暗底上。一眼就不一样。
 *   ③ **动效克制**：只有 hover 的位移/描边、进入视口的淡入。别的地方不动。
 */
@font-face {
  font-family: 'Oaken Display';
  src: url('/oaken/bevan.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bark: #14110d;
  --panel: #1c1712;
  --panel-2: #221b15;
  --line: rgba(240, 228, 208, .10);
  --line-gold: rgba(217, 163, 67, .30);
  --parch: #f3eadb;
  --muted: #a08f78;
  --gold: #d9a343;
  --gold-2: #e8b85c;
  --bad: #e0785f;
  --ok: #9dbf7a;
  --r: 4px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bark);
  color: var(--parch);
  font: 15px/1.65 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, .display { font-family: 'Oaken Display', Georgia, serif; font-weight: 400; letter-spacing: .01em; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .02em; }
.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.muted { color: var(--muted); }
.hide { display: none !important; }

/* ── 顶栏 ───────────────────────────────────────────────────────────── */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 17, 13, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .bar { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--parch); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand b { font-family: 'Oaken Display', Georgia, serif; font-weight: 400; font-size: 22px; letter-spacing: .18em; }
nav.main { display: flex; align-items: center; gap: 24px; font-size: 14.5px; }
nav.main a { color: var(--muted); }
nav.main a:hover, nav.main a.on { color: var(--parch); text-decoration: none; }
nav.main a.on { color: var(--gold); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; white-space: nowrap;
  background: transparent; font-family: inherit; cursor: default;
}
.chip b { color: var(--parch); font-weight: 600; }
.chip.warn { color: var(--bad); border-color: rgba(224, 120, 95, .45); background: rgba(224, 120, 95, .07); }
.chip.warn svg { width: 15px; height: 15px; }

/* 网络菜单（顶栏标签点开）—— 挂在 body 上，别塞进 header 里被 overflow 裁掉 */
.chain-menu { position: fixed; z-index: 60; min-width: 232px; background: var(--panel-2);
              border: 1px solid var(--line-gold); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.chain-menu button { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; width: 100%;
                     background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--parch);
                     font: 14px/1 "Segoe UI", system-ui, sans-serif; padding: 13px 14px; cursor: pointer; text-align: left; }
.chain-menu button:last-of-type { border-bottom: 0; }
.chain-menu button:hover { background: rgba(217, 163, 67, .08); }
.chain-menu button.on { color: var(--gold); }
.chain-menu button span { font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(157, 191, 122, .18); }

/* 钱包选择面板：复用 .chain-menu 的壳，行里多一枚钱包图标（6963 给的是 data: URI） */
.wallet-menu button { align-items: center; justify-content: flex-start; gap: 10px; }
.wallet-menu button b { flex: 1; }
.wallet-menu img { border-radius: 5px; flex: none; }
.wallet-menu .wdot { width: 20px; height: 20px; border-radius: 5px; flex: none;
                     background: linear-gradient(180deg, var(--gold-2), var(--gold)); }

/* ── 按钮 ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .04em;
  padding: 12px 18px; border-radius: var(--r); border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-p { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b1409; box-shadow: 0 10px 24px -14px rgba(217, 163, 67, .9); }
.btn-s { border-color: var(--line-gold); color: var(--gold); background: transparent; }
.btn-s:hover { background: rgba(217, 163, 67, .10); }
.btn-g { border-color: var(--line); color: var(--muted); background: transparent; }
.icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r); color: var(--muted);
}
.icon-btn:hover { color: var(--gold); border-color: var(--line-gold); text-decoration: none; }
.icon-btn svg { width: 17px; height: 17px; }

/* ── 版心与分节 ─────────────────────────────────────────────────────── */
main { padding-bottom: 90px; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 76px 0 40px; }
.hero h1 { font-size: clamp(40px, 5vw, 66px); line-height: 1.04; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { color: var(--muted); font-size: 16.5px; line-height: 1.8; margin-top: 20px; max-width: 54ch; }
.hero .actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-art { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-art img { width: 100%; height: auto; display: block; }   /* ⚠ 高度属性不带 height:auto 会被当成实际高度，图会被拉长 */
.hero-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,17,13,0) 45%, rgba(20,17,13,.72) 100%); }

section.band { padding: 64px 0 0; }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 600 11.5px/1 "Segoe UI", system-ui, sans-serif;
           letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--gold); }
h2.sec { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 30px; }

/* ── 卡片 / 面板 ────────────────────────────────────────────────────── */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px; transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--line-gold); }
.card .n { font-family: 'Oaken Display', Georgia, serif; font-size: 26px; color: var(--gold); display: block; margin-bottom: 10px; }
.card h3 { font-size: 16.5px; color: var(--parch); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.panel .head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.panel .head h3 { font-size: 16px; }
.panel .body { padding: 22px; }

/* 统计条 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
         border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 40px; }
.stats > div { background: var(--panel); padding: 22px 24px; }
.stats .k { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.stats .v { font-family: 'Oaken Display', Georgia, serif; font-size: 30px; color: var(--gold); line-height: 1; }

/* ── 表格 ───────────────────────────────────────────────────────────── */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font: 600 11.5px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .14em;
                text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.list td { padding: 15px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
table.list tbody tr:hover { background: rgba(217, 163, 67, .045); }
table.list tbody tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px;
        padding: 4px 11px; font-size: 12px; color: var(--muted); }
.pill.ok { color: var(--ok); border-color: rgba(157, 191, 122, .35); }
.pill.lock { color: var(--gold); border-color: var(--line-gold); }

/* ── 表单 ───────────────────────────────────────────────────────────── */
label.f { display: block; font-size: 13px; color: var(--muted); letter-spacing: .04em; margin: 18px 0 7px; }
input.i, select.i {
  width: 100%; background: var(--bark); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--parch); font: 15px/1.4 "Segoe UI", system-ui, sans-serif; padding: 13px 14px; outline: none;
  transition: border-color .15s ease;
}
input.i:focus, select.i:focus { border-color: var(--line-gold); }
input.i::placeholder { color: #6f6353; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.err { color: var(--bad); font-size: 13px; margin-top: 10px; }
.steps-mini { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.steps-mini b { color: var(--gold); }

/* ── 记录页：年轮进度 ───────────────────────────────────────────────── */
.ring-wrap { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.ring { position: relative; width: 190px; height: 190px; flex: 0 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .mid b { font-family: 'Oaken Display', Georgia, serif; font-size: 30px; color: var(--gold); line-height: 1; }
.ring .mid span { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 18px; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { font-size: 14.5px; word-break: break-all; }

/* ── 页脚 ───────────────────────────────────────────────────────────── */
footer.bottom { border-top: 1px solid var(--line); background: var(--panel); margin-top: 70px; }
footer.bottom .wrap { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; padding: 26px 0; font-size: 13px; color: var(--muted); }
footer.bottom .sp { margin-left: auto; }

/* 宽幅带：一张图 + 一段话叠在上面（rings 那张用在这儿） */
.band-art { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.band-art img { width: 100%; height: auto; display: block; opacity: .9; }
.band-art::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,17,13,.94) 0%, rgba(20,17,13,.72) 46%, rgba(20,17,13,.18) 100%); }
.band-art-cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
                padding: 0 clamp(22px, 5vw, 64px); max-width: 620px; }
@media (max-width: 940px) {
  .band-art::after { background: linear-gradient(180deg, rgba(20,17,13,.55) 0%, rgba(20,17,13,.94) 62%); }
  .band-art-cap { position: static; padding: 22px; }
}

/* ── 平台层：发射台 / 流水 / 榜单 / 我的 ────────────────────────────────
 *
 * 同一套令牌，不引第二套色。新增的零件只有三类：
 *   · 字母章（代币标识，不挂源站图床）
 *   · 进度条（募资进度，唯一一处会动的东西）
 *   · 标签页 / 名次 / 流水行（把表格式的密排拆成"宽版心"里能读的几栏）
 */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13.5px; }
.tabs a:hover { text-decoration: none; border-color: var(--line-gold); color: var(--parch); }
.tabs a.on { border-color: var(--line-gold); color: var(--gold); background: rgba(217, 163, 67, .08); }

.controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 24px 0 6px; }
.controls input.i, .controls select.i { width: auto; padding: 10px 13px; font-size: 14px; }
.controls input.i { flex: 1 1 260px; max-width: 380px; }

.pad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
@media (max-width: 1040px) { .pad-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .pad-grid { grid-template-columns: 1fr; } }

.fcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px;
         display: flex; flex-direction: column; gap: 14px; color: var(--parch); text-decoration: none;
         transition: border-color .15s ease, transform .15s ease; }
/* 卡片本身就是链接 —— 全局的 `a:hover{underline}` 会把整张卡的每个字都划上 */
.fcard:hover { border-color: var(--line-gold); transform: translateY(-2px); text-decoration: none; }
.fcard .top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.fcard .nm { min-width: 0; flex: 1 1 auto; }
.fcard .nm b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard .nm span { font-size: 12.5px; color: var(--muted); }
.fcard .desc { color: var(--muted); font-size: 13.5px; line-height: 1.62; min-height: 44px;
               display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fcard .foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; }

/* 字母章：源站图床（photos.pinksale.finance）不挂 —— 见 explore.js 的 monogram() */
.tile { width: 42px; height: 42px; border-radius: 6px; flex: 0 0 auto;
        display: inline-flex; align-items: center; justify-content: center;
        background: linear-gradient(180deg, rgba(217,163,67,.16), rgba(217,163,67,.04));
        border: 1px solid var(--line-gold); color: var(--gold);
        font-family: 'Oaken Display', Georgia, serif; font-size: 15px; letter-spacing: .06em; }
.tile.lg { width: 58px; height: 58px; font-size: 20px; border-radius: 8px; }

/* 进度条 + 那一行数字 */
.bar { height: 6px; border-radius: 99px; background: rgba(243, 234, 219, .07);
       border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.bar i.ok { background: linear-gradient(90deg, #7fa85f, var(--ok)); }
.raise { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px;
         color: var(--muted); margin-top: 7px; }
.raise b { color: var(--parch); font-weight: 600; }

.chip.ours { color: var(--gold); border-color: var(--line-gold); }

/* 详情：正文 + 侧栏 */
.dossier { display: grid; grid-template-columns: 1.55fr .95fr; gap: 26px; align-items: start; margin-top: 26px; }
@media (max-width: 940px) { .dossier { grid-template-columns: 1fr; } }
.dossier .side { display: grid; gap: 18px; }
.stack { display: grid; gap: 18px; }

/* 活动流水：一行一件事 */
.feed { display: flex; flex-direction: column; }
.feed .row { display: flex; gap: 14px; align-items: baseline; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed .row:last-child { border-bottom: 0; }
.feed .row:hover { background: rgba(217, 163, 67, .045); }
.feed .t { color: var(--muted); font-size: 12.5px; white-space: nowrap; min-width: 92px; }
.tag { font: 600 10.5px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
       padding: 5px 8px; border-radius: 3px; border: 1px solid var(--line-gold); color: var(--gold); white-space: nowrap; }
.tag.q { border-color: var(--line); color: var(--muted); }

/* 榜单：名次用同一套衬线数字 */
.rank { width: 34px; font-family: 'Oaken Display', Georgia, serif; font-size: 18px; color: var(--muted); }
tr:hover .rank { color: var(--gold); }

/* 分页 */
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 26px; color: var(--muted); font-size: 13.5px; }
.pager button { font: inherit; background: transparent; border: 1px solid var(--line); color: var(--parch);
                border-radius: var(--r); padding: 9px 14px; cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--line-gold); color: var(--gold); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* 侧栏里的外链行 */
.links { display: grid; gap: 10px; }
.links a { display: flex; align-items: center; gap: 10px; color: var(--parch); font-size: 14px; }
.links a:hover { color: var(--gold); text-decoration: none; }
.links a svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 auto; }

/* 骨架（读快照要 350ms —— 上游延迟是给镜像水合留的，留着不动） */
.skel { color: var(--muted); }
.skel::after { content: '…'; }

/* 进入视口的淡入（唯一的滚动动效） */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 46px; }
  .grid3, .grid2, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  nav.main { gap: 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
}
