@font-face { font-family: "Hackou Serif"; src: url("/assets/fonts/noto-serif-tc-subset.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Hackou Mono"; src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
/* Silver River palette (shared with hackou.com and Coldsleep Ark) */
:root {
  --ink: #070D1C;
  --ink-2: #0F1A33;
  --ink-3: #16223A;
  --line: rgba(232, 190, 98, .24);
  --gold: #E8BE62;
  --gold-2: #F6D98F;
  --ver: #E0472F;
  --cyan: #6FD3FF;
  --mist: #EEF2F8;
  --mute: #8EA6C2;
  --ok: #6FD3A6;
  --radius: 14px;
  --serif: "Hackou Serif", "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  --mono: "Hackou Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--mist); font: 16px/1.65 var(--sans); }
a { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
code { font: 0.9em var(--mono); color: var(--gold-2); word-break: break-all; }
h1, h2, h3 { font-family: var(--serif); color: #fff; line-height: 1.25; margin: 0 0 .6em; }
h2 { font-size: 22px; letter-spacing: .04em; }
h2 small { font: 12px var(--sans); color: var(--mute); margin-left: 8px; letter-spacing: 0; }
[hidden] { display: none !important; }
.gift-only { display: none !important; }
.has-gift .gift-only { display: revert !important; }
.has-gift .stat.gift-only { display: block !important; }
.muted { color: var(--mute); }
.fine { font-size: 13px; color: var(--mute); margin: .4em 0; }

/* ---------- banner, header */
.banner { position: sticky; top: 0; z-index: 30; padding: 8px 16px; font-size: 14px; text-align: center; background: #5a1b14; color: #ffd9cf; }
.banner.warn { background: #4a3a10; color: #ffe9a8; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px; white-space: nowrap;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: rgba(7, 15, 31, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 6px; flex: 0 0 auto; }
.brand-en { font: 700 18px var(--serif); color: #fff; letter-spacing: .12em; }
.brand-zh { font: 700 19px var(--serif); color: #fff; letter-spacing: .2em; }
.emblem { width: 28px; height: 28px; border-radius: 6px; align-self: center; }
.world-link { font-size: 12px; color: var(--mute); text-decoration: none; margin-right: auto; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 12px; font-size: 14px; flex: 0 1 auto; min-width: 0; }
.nav .btn-sm { padding: 0 10px; font-size: 12px; }
@media (max-width: 380px) { .brand-en { font-size: 16px; letter-spacing: .08em; } .brand-zh { letter-spacing: .15em; } .nav { gap: 9px; } }
.nav a { text-decoration: none; color: var(--mist); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--gold); background: transparent; color: var(--gold); font: 600 15px var(--sans); text-decoration: none; cursor: pointer; letter-spacing: .04em; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2a1a00; border-color: transparent; box-shadow: 0 6px 24px rgba(226, 184, 92, .25); }
.btn-ghost { border-color: rgba(201, 211, 230, .35); color: var(--mist); }
.btn-wide { width: 100%; margin-top: 12px; }

/* ---------- hero */
.hero { position: relative; min-height: 92vh; min-height: 92svh; display: flex; align-items: flex-end;
  background: linear-gradient(to bottom, rgba(7, 13, 28, 0) 35%, rgba(7, 13, 28, .6) 60%, var(--ink) 92%), url("../img/hero-m.jpg") center top / cover no-repeat; }
@media (min-width: 900px) { .hero { min-height: 78vh; background-image: linear-gradient(to bottom, rgba(7, 13, 28, 0) 40%, var(--ink) 95%), url("../img/hero-w.jpg"); } }
.hero-inner { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px 36px; }
.eyebrow { display: inline-block; margin: 0 0 10px; padding: 3px 10px; background: rgba(7, 13, 28, .72); border: 1px solid var(--line); color: var(--gold-2); font-size: 13px; letter-spacing: .2em; }
.world-line { margin: -6px 0 16px; font-size: 14px; color: var(--cyan); max-width: 34em; }
.verified { margin: 6px 0 0; font-size: 13px; }
.verified a { color: var(--ok); }
.hero h1 { font-size: clamp(30px, 9vw, 54px); letter-spacing: .06em; text-shadow: 0 0 28px rgba(226, 184, 92, .35); }
.hero .dot { color: var(--ver); }
.nw { white-space: nowrap; }
.lede { font-size: 16px; max-width: 34em; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(12, 24, 48, .75); font-size: 13px; color: var(--gold-2); }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-row .btn { flex: 1 1 140px; }
.sale-timer { margin: 14px 0 0; font-size: 14px; color: var(--mist); }
.sale-timer b { color: var(--gold-2); font-variant-numeric: tabular-nums; }

.notice { max-width: 760px; margin: 0 auto; padding: 16px; }
.notice p { margin: 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--ink-2); }

/* ---------- facts */
.facts { max-width: 760px; margin: 0 auto; padding: 8px 16px 0; display: grid; gap: 10px; }
.fact { padding: 14px 16px; border-left: 3px solid var(--ver); background: linear-gradient(90deg, var(--ink-2), transparent); border-radius: 0 var(--radius) var(--radius) 0; }
.fact b { display: block; font-family: var(--serif); color: #fff; font-size: 17px; }
.fact span { font-size: 14px; }

/* ---------- panels */
.panel { position: relative; max-width: 760px; margin: 22px auto 0; padding: 20px 16px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 2px; }
/* 口-shaped gold corners (ART §4.2) */
.panel::before, .panel::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--gold); pointer-events: none; }
.panel::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.upstream .up-art { border-radius: 2px; border: 1px solid var(--line); margin-bottom: 10px; width: 100%; }
.upstream .up-stats { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
.upstream .stat .v { color: var(--cyan); }
@media (max-width: 792px) { .panel { margin-left: 16px; margin-right: 16px; } }
.live-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 5px; vertical-align: 1px; animation: pulse 2s infinite; }
.live-dot.stale::before { background: var(--ver); animation: none; }
@keyframes pulse { 50% { opacity: .3; } }

.progress-wrap { margin-bottom: 16px; }
.progress { position: relative; height: 14px; border-radius: 999px; background: var(--ink-3); overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--ver), var(--gold)); border-radius: 999px; transition: width .6s; }
.progress .tick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .25); }
.progress .t1 { left: 9.99%; }
.progress .t2 { left: 19.98%; }
.progress .gate-mark { position: absolute; top: -2px; bottom: -2px; left: calc(19.98% - 3px); width: 6px; background: var(--gold-2); border-radius: 3px; }
.progress-legend { display: flex; justify-content: space-between; font-size: 13px; color: var(--mute); margin-top: 6px; }
.progress-legend b { color: #fff; font-variant-numeric: tabular-nums; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 12px; border-radius: 10px; background: var(--ink-3); min-width: 0; }
.stat .k { display: block; font-size: 12px; color: var(--mute); }
.stat .v { display: block; font: 600 20px var(--serif); font-variant-numeric: tabular-nums; color: #fff; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .s { display: block; font-size: 12px; color: var(--gold-2); overflow-wrap: anywhere; }
.stat-gate .v { color: var(--gold-2); }
.skel { color: transparent !important; background: linear-gradient(90deg, var(--ink-3), #1b2d50, var(--ink-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- mint */
.mint { display: grid; gap: 16px; }
@media (min-width: 640px) { .mint { grid-template-columns: 220px 1fr; } .mint h2 { grid-column: 1 / -1; } }
.mint-art img { border-radius: 12px; border: 1px solid var(--line); width: 100%; max-width: 200px; margin: 0 auto; }
.qty { display: flex; align-items: center; gap: 10px; }
.qbtn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: var(--gold); font-size: 24px; cursor: pointer; }
.qty output { min-width: 48px; text-align: center; font: 700 32px var(--serif); color: #fff; }
.qmax { margin-left: auto; background: none; border: 1px solid rgba(201, 211, 230, .35); color: var(--mist); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.total { font-size: 18px; margin: 12px 0 0; }
.total b { font: 700 26px var(--serif); color: var(--gold-2); }
.conds { list-style: none; padding: 0; margin: 10px 0 0; font-size: 14px; }
.conds li { padding: 4px 0 4px 24px; position: relative; }
.conds li::before { content: "◇"; position: absolute; left: 2px; color: var(--gold); }
.conds li.ok::before { content: "✓"; color: var(--ok); }
.conds li.bad::before { content: "✕"; color: var(--ver); }
.conds li.bad { color: #ffb3a6; }
.ref-note { font-size: 14px; color: var(--gold-2); }
.tx-status { min-height: 1.4em; font-size: 14px; margin: 10px 0 0; overflow-wrap: anywhere; }
.tx-status.err { color: #ffb3a6; }
.tx-status.ok { color: var(--ok); }
.no-wallet { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--ink-3); font-size: 14px; }
.no-wallet p { margin: 0 0 8px; }
.wallet-pick { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--ink-3); font-size: 14px; }
.wallet-pick p { margin: 0 0 8px; }
.wallet-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.wallet-opt { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-opt img { width: 18px; height: 18px; flex: none; }
.deeplinks { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- mine */
.mine-head { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
@media (min-width: 640px) { .mine-head { grid-template-columns: repeat(4, 1fr); } }
.mine-head div { padding: 10px 12px; background: var(--ink-3); border-radius: 10px; }
.mine-head .k { display: block; font-size: 12px; color: var(--mute); }
.mine-head b { font: 700 20px var(--serif); color: #fff; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { flex: 1 1 150px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(5, 1fr); } }
.card { background: var(--ink-3); border-radius: 10px; overflow: hidden; font-size: 12px; }
.card img { aspect-ratio: 1; width: 100%; }
.card p { margin: 0; padding: 6px 8px; }
.card .p { color: var(--gold-2); }
.reflink { margin-top: 16px; font-size: 14px; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; min-height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink); color: var(--mist); padding: 0 10px; font-size: 13px; }

.keeper p { font-size: 14px; }
.queue { color: var(--gold-2); }

/* ---------- how, dragons */
.how { max-width: 760px; margin: 32px auto 0; padding: 0 16px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; padding: 10px; background: var(--ink-2); border-radius: var(--radius); border: 1px solid var(--line); }
.steps img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.steps b { display: block; font: 600 17px var(--serif); color: #fff; }
.steps b::before { counter-increment: s; content: counter(s) " · "; color: var(--ver); }
.steps span { font-size: 14px; }
.dragons { max-width: 760px; margin: 32px auto 0; padding: 0 16px; }
.dragons-art { border-radius: var(--radius); border: 1px solid var(--line); }
.dragons-body { padding-top: 14px; }
.dragons-body ul { padding-left: 20px; font-size: 15px; }

/* ---------- feed */
.feed { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow: auto; font-size: 14px; }
.feed li { padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); display: flex; gap: 8px; }
.feed .ic { flex: 0 0 22px; text-align: center; }
.feed .t { color: var(--mute); margin-left: auto; font-size: 12px; white-space: nowrap; }

/* ---------- faq, agent */
details { border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 10px 0; }
summary { cursor: pointer; font-weight: 600; color: #fff; list-style: none; position: relative; padding-left: 22px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; position: absolute; left: 0; top: -1px; color: var(--gold); font-weight: 400; font-size: 18px; }
details[open] > summary::before { content: "−"; }
details p { margin: 8px 0 0; font-size: 15px; }
.agent { max-width: 760px; margin: 22px auto 0; padding: 0 16px; font-size: 14px; }
.agent summary { color: var(--mute); font-weight: 400; }
.agent textarea { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: var(--ink-2); color: var(--mist); padding: 10px; font: 13px/1.5 var(--sans); resize: vertical; }

/* ---------- footer */
.foot { max-width: 760px; margin: 40px auto 0; padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.foot .gov { color: var(--mist); }
.addrs { list-style: none; padding: 0; }
.addrs li { padding: 3px 0; overflow-wrap: anywhere; }

/* ---------- share dialog */
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); color: var(--mist); padding: 12px; max-width: min(92vw, 480px); }
dialog::backdrop { background: rgba(0, 0, 0, .7); }
dialog canvas { width: 100%; height: auto; border-radius: 10px; display: block; }
.dlg-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dlg-actions .btn { flex: 1 1 90px; }

/* ---------- rules page */
.doc { max-width: 820px; margin: 0 auto; padding: 24px 16px 0; }
.doc h1 { font-size: clamp(26px, 7vw, 38px); }
.doc h2 { margin-top: 34px; padding-top: 10px; border-top: 1px solid var(--line); }
.doc p, .doc li { font-size: 15px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tbl th { color: var(--mute); font-weight: 400; font-size: 12px; }
.tbl td:first-child { color: #fff; }
.tbl .fn { font: 12px var(--mono); color: var(--mute); word-break: break-all; }
.tbl .val { color: var(--gold-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .val.live::after { content: " ✓"; color: var(--ok); font-size: 11px; }
.tbl .val.mismatch { color: #ffb3a6; }
@media (max-width: 560px) {
  .tbl thead { display: none; }
  .tbl tr { display: block; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .tbl td { display: block; border: 0; padding: 2px 0; }
  .tbl .val { white-space: normal; }
}
.callout { padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--ink-2); border-radius: 0 10px 10px 0; }

/* ---------- 404 */
.lost { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 24px 16px;
  background: linear-gradient(to bottom, rgba(7, 15, 31, .4), var(--ink) 80%), url("../img/leap-fall.jpg") center / cover no-repeat; }
.lost h1 { font-size: 64px; margin: 0; }
