/* arc-20 铭文平台 — Arc light theme, zero external resources */
:root {
  --bg: #eef4fb;
  --bg2: #e7eff8;
  --card: rgba(255, 255, 255, 0.78);
  --card2: #f1f6fb;
  --border: rgba(27, 49, 88, 0.16);
  --border-soft: rgba(27, 49, 88, 0.09);
  --text: #1b3158;
  --muted: #5a6b8c;
  --muted2: #8593ad;
  --accent: #2b4ce2;         /* Arc blue */
  --accent-dim: #7a3ce8;     /* gradient partner (logo purple) */
  --accent-ink: #ffffff;
  --accent-soft: rgba(43, 76, 226, 0.10);
  --accent-glow: rgba(43, 76, 226, 0.18);
  --up: #0b7340;             /* trades / buys */
  --down: #c13a50;           /* asks / sells */
  --up-soft: rgba(14, 138, 77, 0.10);
  --down-soft: rgba(214, 69, 90, 0.10);
  --amber: #8a5f14;
  --blue: #2b6ce2;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(27, 49, 88, 0.05), 0 10px 30px rgba(27, 49, 88, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: #eef4fb;
  background-image:
    radial-gradient(1100px 460px at 82% -8%, rgba(122, 60, 232, 0.08), transparent 62%),
    radial-gradient(820px 380px at -5% 2%, rgba(43, 76, 226, 0.07), transparent 60%),
    linear-gradient(180deg, #b6cff0 0%, #d9e6f5 24%, #eff4fa 58%, #f6f9fc 100%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.62 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: 0.1px;
}

h1, h2, h3, .logo-word, .page-title { font-family: var(--display); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
main.container { flex: 1; padding-top: 28px; padding-bottom: 56px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(240, 246, 252, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-feather {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  object-fit: cover; display: block;
  box-shadow: 0 2px 12px rgba(43, 76, 226, 0.2);
}
.logo-word {
  font-family: var(--display); font-size: 24px; font-weight: 500;
  letter-spacing: 0.3px; line-height: 1;
  color: #16181d; /* 与 logo glyph 同墨色,头部整体统一 */
}
.logo-accent { opacity: 0.62; } /* ·20 同色降透明度,保留层次 */
.logo-sub {
  font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 2px;
  text-transform: uppercase; padding-left: 10px; margin-left: 2px;
  border-left: 1px solid var(--border);
}

.nav { display: flex; gap: 2px; flex: 1; }
.nav a {
  color: var(--muted); padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); text-decoration: none; background: var(--card); }
.nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* Memes launchpad nav entry — set apart from the inscription tabs */
.nav a.nav-memes {
  margin-right: 10px; color: var(--accent);
  border: 1px solid rgba(43, 76, 226, 0.30);
}
.nav a.nav-memes::before { content: "✦"; margin-right: 5px; opacity: .8; font-size: 11px; }
.nav a.nav-memes:hover { background: var(--accent-soft); }
.nav a.nav-memes.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Memes page */
.memes-page { max-width: 720px; }
.memes-hero { text-align: center; padding: 22px 0 8px; }
.memes-badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent);
}
.memes-tagline { color: var(--muted); font-size: 15px; max-width: 32em; margin: 8px auto 18px; line-height: 1.55; }
.memes-h2 { font-size: 16px; margin: 0 0 12px; }
.memes-list { margin: 0; padding-left: 18px; color: var(--text); }
.memes-list li { margin: 8px 0; line-height: 1.5; }
.memes-status { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.memes-status.pending { border-color: rgba(245, 183, 78, 0.3); }
.memes-status.ok { border-color: rgba(43, 76, 226, 0.3); }
.pill-soon { background: rgba(245, 183, 78, 0.15); color: var(--amber); }
.memes-coin {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); margin-bottom: 8px;
}
.memes-coin:hover { border-color: var(--accent); text-decoration: none; }
.memes-coin-by { color: var(--muted); font-size: 13px; }
.memes-coin-name { font-weight: 600; }
.meme-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }

/* Recent launches — rectangular coin cards */
.memes-list-head { margin: 22px 0 12px; }
.memes-grid { display: flex; flex-direction: column; gap: 10px; }
.meme-card {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 14px 16px; transition: border-color .15s, background .15s;
}
.meme-card:hover { border-color: var(--accent); background: #ffffff; }
.meme-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
img.meme-avatar { object-fit: cover; }
.meme-card-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }

/* coming-soon (launchpad not deployed) */
.memes-coming { text-align: center; padding: 64px 24px 40px; }
.memes-coming-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(43, 76, 226, 0.3);
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.memes-coming-title { font-family: var(--serif); font-size: 44px; font-weight: 700; margin: 18px 0 6px; }
.memes-coming p { max-width: 32em; margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* search box */
.memes-search {
  width: 100%; margin: 4px 0 6px; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: 15px; transition: border-color .15s;
}
.memes-search::placeholder { color: var(--muted); }
.memes-search:focus { outline: none; border-color: var(--accent); }

/* sort bar + pagination */
.memes-listbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 12px; }
.memes-listbar .memes-h2 { margin: 0; }
.memes-sort { display: flex; gap: 4px; flex-wrap: wrap; }
.memes-sort button {
  background: var(--card); border: 1px solid var(--border-soft); color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; transition: color .15s, background .15s;
}
.memes-sort button:hover { color: var(--text); }
.memes-sort button.active { background: var(--accent-soft); border-color: rgba(43, 76, 226, 0.3); color: var(--accent); }
.memes-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.memes-pager button {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 6px 14px; font-size: 14px; cursor: pointer;
}
.memes-pager button:disabled { opacity: .4; cursor: default; }
.memes-pageinfo { color: var(--muted); font-size: 13px; }

/* per-card metrics (right side; wraps below on narrow cards) */
.meme-metrics { display: flex; gap: 18px; flex: none; margin-left: auto; }
.meme-metric { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.mm-k { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mm-v { font-size: 14px; font-weight: 700; font-family: var(--mono); }
.meme-card-title { font-weight: 700; font-size: 16px; }
.meme-ticker { color: var(--muted); font-weight: 600; font-size: 13px; }
.meme-ca {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: transparent; border: 0; padding: 2px 0; cursor: pointer;
}
.meme-ca:hover { color: var(--accent); }
.meme-ca-ic { font-size: 12px; opacity: .8; }

/* Create form — avatar square dropzone */
.meme-drop {
  position: relative; display: block; width: 120px; height: 120px; cursor: pointer;
  border: 1px dashed var(--border); border-radius: 16px; overflow: hidden;
  background: var(--card); transition: border-color .15s;
}
.meme-drop:hover { border-color: var(--accent); }
.meme-drop-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meme-drop-hint {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.meme-drop-plus { font-size: 28px; font-weight: 300; line-height: 1; }

/* Create form top row: avatar (left) + Name/Ticker (right) */
.meme-form-top { display: flex; gap: 16px; align-items: stretch; }
.meme-form-top .meme-drop { flex: none; width: 132px; height: auto; align-self: stretch; }
.meme-form-top-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.meme-form-top-right .field { flex: 1; display: flex; flex-direction: column; }
.meme-form-top-right .field input { flex: 1; }

/* Coin detail — social links */
.meme-socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.meme-social {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text);
}
.meme-social:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Coin detail page */
.coin-page { max-width: 640px; }
.coin-hero { display: flex; align-items: center; gap: 16px; margin: 10px 0 20px; }
.coin-hero .meme-avatar { width: 72px; height: 72px; border-radius: 20px; font-size: 32px; flex: none; }
.coin-hero-info { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.coin-hero-title { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.1; }
.coin-hero-title .ticker { font-family: var(--mono); font-size: 16px; color: var(--muted); font-weight: 600; }
.coin-ca { align-self: flex-start; }
.coin-hero-info .meme-socials { margin-top: 0; }

.coin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.coin-stat { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 14px 10px; text-align: center; }
.cs-k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.cs-v { font-size: 18px; font-weight: 700; font-family: var(--mono); }
@media (max-width: 520px) { .coin-stats { grid-template-columns: repeat(2, 1fr); } }

.narrow-page.coin-page .card { margin-bottom: 18px; }
.coin-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.coin-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.coin-info.wide { grid-column: 1 / -1; }
.ci-k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ci-v { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.coin-info .addr-link { font-family: var(--mono); font-weight: 600; }
@media (max-width: 480px) { .coin-info-grid { grid-template-columns: 1fr; gap: 14px; } }

.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; position: relative; }
.block-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
  background: var(--card); border: 1px solid var(--border-soft);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.block-pill b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(43, 76, 226, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(43, 76, 226, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 76, 226, 0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--card2); color: var(--text);
  padding: 9px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: filter .15s, transform .05s, box-shadow .15s;
  font-family: inherit; line-height: 1.4;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn-primary {
  background: linear-gradient(135deg, #2b4ce2, #7a3ce8);
  border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 4px 18px rgba(43, 76, 226, 0.22);
}
.btn-danger { background: var(--down-soft); border-color: rgba(255, 90, 106, 0.4); color: var(--down); }
.btn-wallet { padding: 7px 16px; font-family: var(--mono); font-size: 13px; }
.btn-big { width: 100%; padding: 14px; font-size: 16px; border-radius: 12px; }
.btn.small { padding: 5px 12px; font-size: 12px; border-radius: 8px; }

/* ---------- cards / layout ---------- */
.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card h2 { font-size: 15px; font-weight: 650; letter-spacing: 0.2px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { line-height: 1.4; }
h1.page-title {
  font-family: var(--display); font-size: 30px; font-weight: 400; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; letter-spacing: 0.2px;
}
h1.page-title.centered { justify-content: center; text-align: center; }
/* arc.io-style eyebrow label: [ ARC IS LIVE ] */
.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase; color: #6d5a1e;
  margin: 26px 0 14px; user-select: none;
}
.eyebrow::before, .eyebrow::after { content: ""; color: var(--amber); font-weight: 400; }
.eyebrow::before { content: "["; }
.eyebrow::after { content: "]"; }
.hero-title {
  font-family: var(--display); font-weight: 300; text-align: center;
  font-size: clamp(34px, 5.2vw, 56px); line-height: 1.12; letter-spacing: -0.5px;
  color: var(--text); margin: 0 auto 14px; max-width: 820px;
}
.hero-sub {
  text-align: center; color: var(--muted); font-size: 16px; line-height: 1.65;
  max-width: 640px; margin: 0 auto 26px;
}

/* centered single-column page (deploy form, etc.) */
.narrow-page { max-width: 600px; margin: 0 auto; padding-top: 12px; }
.narrow-page .card { margin-bottom: 0; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.stat .v { font-size: 22px; font-weight: 700; font-family: var(--mono); color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-bottom: 18px; }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px 18px; }
.kv .k { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.kv .v { font-size: 14px; font-weight: 600; word-break: break-all; }
.kv .v.mono { font-family: var(--mono); font-weight: 500; }

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.small { font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty.small { padding: 20px 12px; font-size: 13px; }
.error-card { border-color: rgba(255, 90, 106, 0.4); color: var(--down); text-align: center; }

.notice {
  background: rgba(245, 183, 78, 0.07); border: 1px solid rgba(245, 183, 78, 0.3);
  color: var(--amber); border-radius: var(--radius);
  padding: 11px 15px; font-size: 13px; margin-bottom: 18px;
}
.hint-box {
  background: var(--bg2); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 12px; color: var(--muted); margin-top: 12px;
  word-break: break-all; line-height: 1.7;
}
.hint-box code { font-family: var(--mono); color: var(--accent); font-size: 11px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--card); margin-bottom: 18px; box-shadow: var(--shadow); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th, .tbl td { padding: 13px 16px; text-align: left; white-space: nowrap; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); background: var(--bg2); }
.tbl td { border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr.clickable { cursor: pointer; transition: background .12s; }
.tbl tbody tr.clickable:hover { background: var(--card2); }
.tbl.compact th, .tbl.compact td { padding: 9px 16px; }
.tbl.compact { min-width: 480px; }

/* ---------- progress ---------- */
.prog { height: 8px; background: var(--bg2); border-radius: 999px; overflow: hidden; min-width: 90px; }
.prog-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); transition: width .4s; }
.prog.big { height: 14px; }
.prog-label { font-size: 12px; color: var(--muted); margin-top: 5px; font-family: var(--mono); }

/* ---------- pills / badges ---------- */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.pill-live { background: var(--accent-soft); color: var(--accent); }
.pill-done { background: rgba(139, 151, 168, 0.15); color: var(--muted); }
.pill-warn { background: rgba(245, 183, 78, 0.15); color: var(--amber); }
.pill-red { background: var(--down-soft); color: var(--down); }
.pill-blue { background: rgba(43, 108, 226, 0.12); color: var(--blue); }

.tick-badge {
  display: inline-block; font-family: var(--mono); font-weight: 700;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 10px; border-radius: 8px; font-size: 14px;
}
.tick-badge.lg { font-size: 18px; padding: 4px 14px; }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm); padding: 11px 13px;
  font-size: 15px; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.field input:focus, .field select:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input.mono { font-family: var(--mono); }
.field .sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field .sub b { color: var(--accent); font-family: var(--mono); font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============ 市场 · 订单簿 ============ */
.mkt { display: flex; flex-direction: column; gap: 18px; }

/* trading-pair strip */
.pair-search-wrap { margin-bottom: 10px; }
.pair-search {
  width: 100%; box-sizing: border-box; background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; font-family: inherit;
}
.pair-search::placeholder { color: var(--muted); }
.pair-search:focus { outline: none; border-color: var(--accent); }
.pair-empty { padding: 12px 4px; }
.pair-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pair {
  flex: none; display: flex; flex-direction: column; gap: 2px;
  min-width: 108px; padding: 10px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border-soft); transition: border-color .15s, background .15s;
}
.pair:hover { text-decoration: none; border-color: var(--border); background: var(--card2); }
.pair.active { border-color: var(--accent); background: var(--accent-soft); }
.pair-tick { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--text); }
.pair.active .pair-tick { color: var(--accent); }
.pair-sub { font-size: 11px; color: var(--muted); }

/* stat bar */
.mkt-statbar { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 0; }
.stat-lead { display: flex; align-items: center; gap: 10px; padding-right: 12px; border-right: 1px solid var(--border); }
.stat-item { display: flex; flex-direction: column; gap: 1px; }
.stat-item .k { font-size: 11px; color: var(--muted); }
.stat-item .v { font-size: 17px; font-weight: 700; font-family: var(--mono); }
.stat-item .v.hl { color: var(--accent); }

/* main grid */
.mkt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.mkt-side { display: flex; flex-direction: column; gap: 18px; }
/* order book fills its column height so both columns bottom-align */
.mkt-grid > .book-card { align-self: stretch; }
/* asks and bids each take an equal half of the card's height */
.book-card { display: flex; flex-direction: column; }
.book-card, .trades-card { margin-bottom: 0; }
.buy-card { margin-bottom: 0; }

/* order book */
.book-head, .book-row {
  display: grid; grid-template-columns: 1.1fr 1fr 1fr 0.8fr; gap: 8px;
  align-items: center; padding: 7px 12px; font-size: 13px;
}
.book-head { color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--border-soft); }
.book-head span:not(:first-child), .book-row span:not(:first-child) { text-align: right; }
.book { flex: 1 1 0; min-height: 90px; overflow-y: auto; }
/* center the empty-state message within its equal half */
.book > .empty { display: flex; align-items: center; justify-content: center; height: 100%; text-align: center; }
.book-row { position: relative; cursor: pointer; border-radius: 6px; transition: background .1s; }
.book-row .depth { position: absolute; right: 0; top: 2px; bottom: 2px; background: var(--down-soft); border-radius: 4px; z-index: 0; }
.book-row > span { position: relative; z-index: 1; }
.book-row:hover { background: rgba(27, 49, 88, 0.045); }
.book-row.sel { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.book-row.mine { background: rgba(43, 108, 226, 0.06); }
.ask-unit { color: var(--down); font-family: var(--mono); font-weight: 600; }
.ask-unit.floor { color: #c23757; }
.book-row.mine::after { content: "You"; position: absolute; left: -2px; top: -8px; }

/* buy panel */
.buy-rows { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.buy-rows .l-row, .l-row { display: flex; justify-content: space-between; font-size: 13px; align-items: baseline; }
.l-row .k { color: var(--muted); }
.l-row .v { font-family: var(--mono); }
.l-row .v.hl { color: var(--accent); font-weight: 700; }
.l-row.total { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 2px; }
.l-row.total .k { color: var(--text); font-weight: 600; }
.l-row.total .v { font-size: 16px; }

/* charts (price + depth) */
.mkt-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mkt-charts .chart-card { margin-bottom: 0; }
.chart { min-height: 120px; display: flex; flex-direction: column; }
.chart-svg { width: 100%; height: 100px; display: block; }
.chart-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.chart-legend .up { color: var(--up); } .chart-legend .down { color: var(--down); }
.chart .empty { margin: auto; }

/* price chart: range selector + y-axis gridlines + hover tooltip */
.price-ranges { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.price-ranges button {
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  border-radius: 6px; padding: 3px 9px; font-size: 11px; font-family: inherit; cursor: pointer;
}
.price-ranges button:hover { color: var(--text); }
.price-ranges button.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.chart-plot { position: relative; height: 180px; margin: 2px 0 4px; }
.cg-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--border-soft); }
.cg-label {
  position: absolute; left: 0; top: -7px; font-size: 10px; color: var(--muted);
  font-family: ui-monospace, monospace; background: var(--card2); padding: 0 4px; border-radius: 3px;
}
.cg-dot {
  position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--up);
  transform: translate(-50%, 50%); opacity: 0.72; cursor: pointer;
}
.cg-dot.last { background: var(--accent); width: 9px; height: 9px; opacity: 1; box-shadow: 0 0 0 3px var(--accent-soft); }
.cg-dot:hover { opacity: 1; z-index: 4; box-shadow: 0 0 0 3px var(--accent-soft); }
.chart-tip {
  position: absolute; transform: translate(-50%, -115%); background: var(--card2);
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px; font-size: 11px;
  white-space: nowrap; pointer-events: none; z-index: 6; box-shadow: 0 6px 20px rgba(27, 49, 88, 0.20);
}
@media (max-width: 720px) { .mkt-charts { grid-template-columns: 1fr; } }

/* sweep (buy-by-quantity) */
.sweep-card { margin-bottom: 0; }
.sweep-input { display: flex; gap: 10px; }
.sweep-input input {
  flex: 1; background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 15px; font-family: var(--mono);
  outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.sweep-input input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px var(--accent-soft); }
.sweep-input .btn { flex: none; padding-inline: 22px; }
.sweep-summary { margin-top: 12px; line-height: 1.7; }
.sweep-summary b { font-family: var(--mono); }
.sweep-summary b.hl { color: var(--accent); }

/* wallet picker (EIP-6963) */
.wallet-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); animation: toast-in .18s ease; }
.wm-box { width: min(360px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.6); overflow: hidden; }
.wm-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; font-weight: 650; font-size: 16px; border-bottom: 1px solid var(--border-soft); }
.wm-close { background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.wm-close:hover { color: var(--text); }
.wm-list { display: flex; flex-direction: column; padding: 8px; gap: 4px; max-height: 60vh; overflow-y: auto; }
.wm-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text); font-family: inherit; text-align: left; }
.wm-item:hover { background: var(--card2); border-color: var(--border); }
.wm-item img, .wm-item .wm-ph { width: 30px; height: 30px; border-radius: 8px; flex: none; object-fit: cover; }
.wm-item .wm-ph { background: var(--bg2); border: 1px solid var(--border); }

/* custom themed dropdown (replaces native <select>) */
.cselect { position: relative; display: inline-block; }
.field .cselect { display: block; }
.cs-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-width: 150px; background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 14px;
  font-family: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.discover-controls .cs-btn { min-width: 170px; }
.cs-btn:hover { border-color: var(--muted2); }
.cselect .cs-arrow { color: var(--muted); font-size: 10px; }
.cs-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-pop {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; min-width: 100%;
  background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 14px 36px rgba(27, 49, 88, 0.20); padding: 5px; display: flex; flex-direction: column;
  gap: 2px; max-height: 280px; overflow-y: auto; animation: toast-in .12s ease;
}
/* [hidden] alone can't hide a flex box — its display:none is a UA rule that our
   .cs-pop{display:flex} overrides. This makes the hidden attribute actually close it. */
.cs-pop[hidden] { display: none; }
.cs-opt {
  text-align: left; background: transparent; border: none; color: var(--text);
  padding: 10px 12px; border-radius: 7px; font-size: 14px; font-family: inherit; cursor: pointer;
}
.cs-opt:hover { background: var(--card); }
.cs-opt.sel { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* discovery: controls + activity feed */
.discover-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.discover-controls input {
  flex: 1; min-width: 160px; background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px;
  outline: none; -webkit-appearance: none; appearance: none;
}
.discover-controls input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px var(--accent-soft); }
.discover-controls select {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; font-family: inherit; outline: none;
}
.filters { display: inline-flex; gap: 4px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; }
.filters button {
  border: none; background: transparent; color: var(--muted); padding: 6px 13px;
  border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.filters button.active { background: var(--card2); color: var(--accent); }

.activity { display: flex; flex-direction: column; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.pager-info { font-family: var(--mono); min-width: 90px; text-align: center; }
.act-row { display: grid; grid-template-columns: 56px 70px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.act-row:last-child { border-bottom: none; }
.act-tag { text-align: center; padding: 2px 0; border-radius: 5px; font-size: 11px; font-weight: 700; }
.act-mint { background: var(--accent-soft); color: var(--accent); }
.act-trade { background: var(--up-soft); color: var(--up); }
.act-list { background: var(--down-soft); color: var(--down); }
.act-bid { background: rgba(43,108,226,0.14); color: var(--blue); }
.act-deploy { background: rgba(245,183,78,0.14); color: var(--amber); }
.act-tick { font-family: var(--mono); font-weight: 700; color: var(--text); }
.act-detail { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-who, .act-block { white-space: nowrap; }
@media (max-width: 720px) {
  .act-row { grid-template-columns: 48px 1fr auto; }
  .act-who, .act-detail { display: none; }
}

/* two-sided book: bids side, spread, place-bid, accept/cancel */
.book-side-label { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 12px 4px; font-size: 12px; }
.book-side-label .down { color: var(--down); font-weight: 700; }
.book-side-label .up { color: var(--up); font-weight: 700; }
.book-spread { display: flex; justify-content: space-between; padding: 6px 12px; margin: 4px 0; font-size: 12px; color: var(--muted); background: var(--bg2); border-radius: 6px; }
.book.bids { flex: 1 1 0; }
.book-row .depth.up { background: var(--up-soft); }
.bid-unit { color: var(--up); font-family: var(--mono); font-weight: 600; }
.bid-unit.top { color: #0e8a4d; }
.mini-btn { border: 1px solid var(--border); background: var(--card2); color: var(--text); border-radius: 6px; padding: 3px 10px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.mini-btn.ok { border-color: rgba(43,76,226,0.5); color: var(--accent); background: var(--accent-soft); }
.mini-btn.danger { border-color: rgba(255,90,106,0.4); color: var(--down); background: var(--down-soft); }
.mini-btn:hover { filter: brightness(1.15); }
.bid-card { margin-bottom: 0; }
.bid-form-row { display: flex; gap: 10px; margin-bottom: 4px; }
.bid-form-row input { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 15px; font-family: var(--mono); outline: none; -webkit-appearance: none; appearance: none; }
.bid-form-row input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px var(--accent-soft); }
.bid-card .btn-big { margin-top: 10px; }
.my-order .tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; margin-right: 4px; }
.my-order .tag.sell { background: var(--down-soft); color: var(--down); }
.my-order .tag.buy { background: var(--up-soft); color: var(--up); }
.stat-item .v.up { color: var(--up); }

/* recent trades */
.trades-head, .trade-row {
  display: grid; grid-template-columns: 1.1fr 1fr 1.2fr 0.7fr; gap: 8px;
  align-items: center; padding: 6px 12px; font-size: 13px;
}
.trades-head { color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--border-soft); }
.trades-head span:not(:first-child), .trade-row span:not(:first-child) { text-align: right; }
.trades { max-height: 320px; overflow-y: auto; }
.trade-row .up { color: var(--up); font-weight: 600; }

/* forms row + my orders */
.mkt-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mkt-forms .card { margin-bottom: 0; }
.my-orders { display: flex; flex-direction: column; gap: 10px; }
.my-order { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.my-order .mo-main { font-size: 14px; }

/* ---------- listing cards (legacy, used on 我的) ---------- */
.listing { display: flex; flex-direction: column; gap: 10px; margin-bottom: 0; }
.listing .l-head { display: flex; justify-content: space-between; align-items: center; }
.listing .l-amt { font-size: 22px; font-weight: 700; font-family: var(--mono); }
.listing .l-amt span { font-size: 13px; color: var(--muted); font-weight: 500; }

/* ---------- mint hero ---------- */
.mint-card { border-color: rgba(43, 76, 226, 0.32); box-shadow: 0 0 46px rgba(43, 76, 226, 0.07); }
.mint-price { text-align: center; font-size: 15px; margin-bottom: 14px; color: var(--muted); }
.mint-price b { color: var(--accent); font-family: var(--mono); font-size: 20px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(400px, calc(100vw - 32px)); }
.toast {
  background: var(--card2); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 13px 17px; font-size: 14px;
  box-shadow: 0 10px 34px rgba(27, 49, 88, 0.20); animation: toast-in .25s ease; cursor: pointer; word-break: break-word;
}
.toast a { font-family: var(--mono); font-size: 13px; }
.toast.ok { border-color: rgba(43, 76, 226, 0.5); }
.toast.err { border-color: rgba(255, 90, 106, 0.5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border-soft); padding: 22px 0; font-size: 12px; color: var(--muted); text-align: center; }
.footer-inner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.footer-tag { font-weight: 600; color: var(--text); letter-spacing: .2px; }
.footer-x { display: inline-flex; color: var(--muted); transition: color .15s; }
.footer-x:hover { color: var(--accent); }
.footer-sep { color: var(--border); }

/* wallet dropdown menu (address + disconnect) */
.wallet-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; min-width: 180px;
  background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 14px 36px rgba(27, 49, 88, 0.20); padding: 6px; display: flex; flex-direction: column;
  gap: 2px; animation: toast-in .12s ease;
}
.wm-addr { padding: 8px 12px; font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }
.wm-item {
  text-align: left; background: transparent; border: none; color: var(--text);
  padding: 10px 12px; border-radius: 7px; font-size: 14px; font-family: inherit; cursor: pointer;
}
.wm-item:hover { background: var(--card); }
.wm-danger { color: var(--down); }
.wm-danger:hover { background: var(--down-soft); }

/* trade gate: a tick must be 100% minted before trading */
.mkt.gated .mkt-grid, .mkt.gated .trades-card, .mkt.gated .mkt-forms, .mkt.gated .mkt-charts { display: none; }
.trade-gate { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.trade-gate .tg-lock { font-size: 22px; }
.trade-gate .tg-text { flex: 1; font-size: 15px; color: var(--text); }
.trade-gate .btn { flex: 0 0 auto; }

.addr-link { font-family: var(--mono); }
.back-link { display: inline-block; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.back-link:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .mkt-grid { grid-template-columns: 1fr; }
  .mkt-forms { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .container { padding: 0 14px; }
  .topbar-inner { gap: 10px; padding: 10px 14px; }
  /* R14 移动端顶栏压缩：nav 保持单行横向滚动（不折行），sticky 高度不再占约 1/6 视口 */
  .nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
  .logo-word { font-size: 20px; }
  .logo-sub { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  h1.page-title { font-size: 22px; }
  .mkt-statbar { gap: 16px 20px; }
  .stat-lead { border-right: none; width: 100%; }
  #toasts { right: 8px; left: 8px; bottom: 8px; max-width: none; }
}

/* ---------- 页内确认框（confirmDialog） ---------- */
.confirm-box { width: min(480px, calc(100vw - 32px)); }
.confirm-body { padding: 4px 16px 6px; font-size: 14px; line-height: 1.65; color: var(--text); }
.confirm-body p { margin-bottom: 8px; }
.confirm-body ol { margin: 0 0 6px 20px; display: grid; gap: 7px; }
.confirm-body b { color: var(--text); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px 14px; }
.confirm-actions .btn { min-width: 110px; }
.confirm-body select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card2); color: var(--text); font: inherit; }

/* 算力滑条：渐变填充 + 大号百分比读数 */
.power-row { display: flex; align-items: center; gap: 14px; }
.power-row input[type="range"] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim)) no-repeat #dbe6f4;
  background-size: 100% 100%; outline: none; cursor: pointer;
}
.power-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(43, 76, 226, 0.35); cursor: grab;
}
.power-row input[type="range"]::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.12); }
.power-row input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(43, 76, 226, 0.35); cursor: grab;
}
.power-pct {
  font-family: var(--mono); font-weight: 700; font-size: 22px; color: var(--accent);
  min-width: 72px; text-align: right;
}
#dlgPowerHint { margin-top: 6px; }

/* ---------- PoW miner panel ---------- */
.miner-panel {
  margin-top: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.miner-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.miner-row .btn { flex: none; }
.miner-stats { display: block; margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--text); }
.miner-bar {
  margin-top: 8px; height: 6px; border-radius: 3px;
  background: var(--card2); border: 1px solid var(--border-soft); overflow: hidden;
}
.miner-bar > div {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.4s ease;
}
#minerLog { margin-top: 8px; font-family: var(--mono); word-break: break-all; }

/* ---------- 动效 ---------- */

/* 页面入场：卡片上浮淡入（仅导航切换后的首帧，SSE 重渲染不重播） */
.page-enter .card { animation: card-in 0.5s cubic-bezier(0.22, 0.7, 0.3, 1) both; }
.page-enter .card:nth-child(2) { animation-delay: 0.06s; }
.page-enter .card:nth-child(3) { animation-delay: 0.12s; }
.page-enter .card:nth-child(4) { animation-delay: 0.18s; }
.page-enter .card:nth-child(5) { animation-delay: 0.24s; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.995); }
  to { opacity: 1; transform: none; }
}

/* 按钮微交互 */
.btn { transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  /* 高光扫过 */
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg); animation: sheen 3.4s ease-in-out infinite;
}
@keyframes sheen { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }

/* 进度条：常驻微光，挖矿时跑马灯条纹 */
.prog-fill, .miner-bar > div { position: relative; overflow: hidden; }
.mint-card.mining .prog-fill::after,
.miner-panel.mining .miner-bar > div::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(60deg, transparent 0 7px, rgba(255, 255, 255, 0.4) 7px 14px);
  animation: stripes 0.55s linear infinite;
}
@keyframes stripes { from { background-position: 0 0; } to { background-position: -28px 0; } }

/* Live 徽标：呼吸圆点 */
.pill-pulse::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px;
  border-radius: 50%; background: var(--up); vertical-align: 1px;
  animation: dot-pulse 1.6s ease-out infinite;
}
@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 138, 77, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(14, 138, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 138, 77, 0); }
}

/* tick 徽标与表格行 */
.tick-badge { transition: transform 0.15s ease; }
tr.clickable:hover .tick-badge { transform: scale(1.06); }
.tbl tbody tr, .book-row { transition: background 0.15s ease; }

/* 挖矿面板：流光边框 + 呼吸辉光（一眼可见在算） */
.miner-panel.mining {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg2), var(--bg2)) padding-box,
    linear-gradient(120deg, #2b4ce2, #7a3ce8, #c237ab, #2b4ce2) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: border-pan 3.2s linear infinite, panel-glow 2.1s ease-in-out infinite;
}
@keyframes border-pan {
  from { background-position: 0 0, 0% 50%; }
  to { background-position: 0 0, 300% 50%; }
}
@keyframes panel-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43, 76, 226, 0); }
  50% { box-shadow: 0 0 26px 3px rgba(43, 76, 226, 0.28); }
}

/* 挖矿中的镐头摆动 */
.miner-pick { display: inline-block; animation: pick-bob 1.05s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes pick-bob {
  0%, 100% { transform: rotate(-14deg) translateY(0); }
  50% { transform: rotate(16deg) translateY(-3px); }
}

/* 出块（解出 nonce）绿色闪光 */
.miner-panel.found { animation: found-flash 0.9s ease, border-pan 3.2s linear infinite, panel-glow 2.1s ease-in-out infinite; }
@keyframes found-flash {
  0% { box-shadow: 0 0 0 4px rgba(14, 138, 77, 0.55); background-color: rgba(14, 138, 77, 0.16); }
  100% { box-shadow: 0 0 0 0 rgba(14, 138, 77, 0); }
}

/* 算力数字轻微跳动 */
#minerRate { display: inline-block; animation: rate-tick 1.3s ease-in-out infinite; }
@keyframes rate-tick { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* 尊重减弱动态偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ R13 keyboard accessibility: visible focus + modal overlay ============ */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.book-row:focus-visible, #tickRows tr[data-tick]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(27,49,88,0.35); display: flex; align-items: center; justify-content: center; z-index: 100; }
