:root {
  color-scheme: dark;
  --bg: #080a0e;
  --panel: #10151f;
  --panel-inset: #191f2b;
  --line: #252c37;
  --text: #f1f5f9;
  --muted: #85909e;
  --green: #2ed7a3;
  --yellow: #ffc444;
  --red: #fa727b;
  --accent: var(--green);
  --radius: 12px;
  --gap: 6px;
  --caption: 10px;
  --value: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
button:disabled { opacity: .35; cursor: default; }
.hidden { display: none !important; }
.shell { max-width: 1040px; margin: auto; padding: 8px 10px 20px; }
.topbar { display: flex; justify-content: center; align-items: center; position: relative; min-height: 32px; margin-bottom: 10px; }
.top-title { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.ticker { position: absolute; right: 0; display: flex; align-items: center; gap: 5px; font-size: 9px; letter-spacing: 1px; color: var(--muted); }
.ticker-dot, .pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.round-btn { position: absolute; left: 0; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); font-size: 22px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #0b2624; color: var(--green); font-size: 20px; }
h1 { margin: 0; font-size: 17px; font-weight: 700; }
.updated { margin-top: 2px; font-size: var(--caption); color: var(--muted); }
.head-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.pill { display: flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #1d574b; border-radius: 20px; background: #0a2420; color: #74e4c5; font-size: 10px; font-weight: 650; white-space: nowrap; }
.refresh, .ghost-btn, .page-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 16px; background: #111620; color: #dbe2ec; font-size: 11px; }
.refresh.icon-only { width: 32px; min-height: 32px; padding: 0; font-size: 21px; }
button[aria-busy=true] { opacity: .5; cursor: wait; }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--gap); }
.card, .hero { position: relative; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg,#111824,#10141e); }
.card { min-width: 0; height: 100px; padding: 7px 9px; border-radius: 14px; text-align: left; transition: border-color .15s; }
.card::before, .hero::before { position: absolute; content: ""; inset: 0 0 auto; height: 3px; background: var(--accent); }
.card:hover { border-color: #3b4959; }
.card:active { background: #18212d; }
.card-head { display: flex; align-items: center; gap: 5px; height: 22px; }
.badge { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 7px; background: color-mix(in srgb,var(--coin) 13%,#101720); color: var(--coin); font-size: 12px; font-weight: 700; }
.name { display: flex; align-items: center; gap: 2px; min-width: 0; }
.sym { color: #abb4c1; font-size: 12px; font-weight: 650; letter-spacing: .6px; }
.testnet { font-size: 8px; color: var(--muted); margin-left: 3px; }
.dot { flex: none; width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--green); box-shadow: 0 0 0 3px #2ed7a31a; }
.dot.warn { background: var(--yellow); }
.dot.bad { background: var(--red); }
.chev { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #1a202c; color: #7d8798; font-size: 18px; }
.hash-line { display: flex; align-items: baseline; gap: 4px; min-height: 23px; margin: 4px 0; }
.hash { font-size: 20px; line-height: 23px; font-weight: 730; letter-spacing: -.6px; white-space: nowrap; }
.hash small { font-size: 9px; color: #929cab; font-weight: 600; letter-spacing: 0; }
.card-sub { color: #929cab; font-size: 8px; white-space: nowrap; }
.card-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.stat { min-width: 0; padding: 3px 5px; border-radius: 7px; background: var(--panel-inset); }
.stat-label { color: #8692a2; font-size: 8px; line-height: 10px; }
.stat-value { overflow: hidden; color: var(--text); font-size: 11px; line-height: 15px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.empty-hash { color: #a2acba; }
.foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin-top: 16px; color: #657180; font-size: 9px; }
#detailView { max-width: 620px; margin: auto; }
.detail-actions { display: flex; justify-content: space-between; margin-bottom: 10px; }
.hero { padding: 12px; border-radius: var(--radius); background: radial-gradient(ellipse at top right,#2ed7a30b,transparent 65%),var(--panel); }
.hero::before { height: 2px; background: linear-gradient(90deg,var(--accent),transparent); }
.hero-top { display: flex; align-items: center; gap: 8px; }
.hero .badge { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
.hero-name { font-size: 17px; font-weight: 700; line-height: 1.15; }
.hero-pool { max-width: 220px; margin-top: 3px; color: var(--muted); font-size: 10px; }
.price { flex-shrink: 0; margin-left: auto; text-align: right; }
.price-label { color: var(--muted); font-size: 9px; }
.price-value { font-size: 15px; font-weight: 700; }
.change { margin-top: 1px; font-size: 10px; font-weight: 600; }
.change.up { color: var(--green); }
.change.down { color: var(--red); }
.big-hash { margin-top: 13px; font-size: 27px; line-height: 1.2; font-weight: 730; letter-spacing: -.6px; }
.big-hash small { color: #8e98a7; font-size: 12px; letter-spacing: 0; }
.hero-sub { margin-top: 5px; color: #929cab; font-size: 10px; }
.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #ffffff09; color: var(--muted); font-size: 9px; }
.hero-foot b { color: #b2bccb; font-weight: 500; }
.panel-title { display: flex; align-items: center; gap: 7px; margin: 16px 0 8px; font-size: 13px; font-weight: 650; }
.panel-title span { color: var(--muted); font-size: 10px; font-weight: 400; }
.balance-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--gap); }
.balance { min-width: 0; min-height: 53px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.balance .k { color: var(--muted); font-size: var(--caption); }
.balance .v { margin-top: 3px; font-size: var(--value); font-weight: 650; overflow-wrap: anywhere; }
.balance .v small { font-size: 10px; color: #b2bccb; font-weight: 500; }
.progress { height: 2px; overflow: hidden; margin-top: 5px; border-radius: 2px; background: #222e35; }
.progress i { display: block; height: 100%; background: var(--green); }
.device-list, .payment-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.device, .payment { padding: 10px; border-bottom: 1px solid #252c3780; }
.device:last-child, .payment:last-child { border-bottom: 0; }
.row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.device-name { min-width: 0; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.state { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.state .dot { margin: 0; }
.device-hash { margin: 6px 0; font-size: 16px; font-weight: 650; }
.device-hash small { color: var(--muted); font-size: 10px; }
.device-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 9px; }
.device-agent { margin-top: 5px; }
.payment-amount { font-size: 13px; font-weight: 650; }
.payment-amount small { color: var(--muted); font-size: 10px; font-weight: 450; }
.payment-date { margin-top: 3px; color: var(--muted); font-size: 10px; }
.tx { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; margin-top: 6px; color: #8a9bac; font: 10px/1.4 ui-monospace,SFMono-Regular,monospace; }
.tx span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.copy-btn { flex-shrink: 0; min-height: 25px; padding: 3px 7px; border: 1px solid #2b3441; border-radius: 6px; background: #1c2430; color: #b0c1d2; font-size: 10px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.page-btn { min-width: 64px; border-radius: 8px; }
.page-info { text-align: center; color: #a8b4c4; font-size: 11px; }
.page-info small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.empty-state { padding: 16px 10px; border: 1px dashed #29323e; border-radius: var(--radius); background: #10151a80; color: var(--muted); font-size: 11px; text-align: center; }
.addr { padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: #82909f; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.status-line { margin-top: 8px; color: #758191; font-size: 10px; line-height: 1.6; }
.notice { color: #ecb95a; }
.load-error { grid-column: 1/-1; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
@media(min-width:700px) {
  .shell { padding: 20px; }
  .topbar { min-height: 40px; margin-bottom: 20px; }
  .top-title { font-size: 20px; }
  .grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .card { height: 112px; padding: 10px 12px; }
  .card-head { height: 24px; }
  .hash-line { margin: 6px 0; }
  .stat { padding: 4px 6px; }
  .stat-value { font-size: 12px; }
  .hero { padding: 16px; }
  .balance-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(min-width:1000px) { .grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media(max-width:370px) { .ticker { display: none; } .hero-pool { max-width: 140px; } }
@media(prefers-reduced-motion:reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
