/* MoonApe — dark terminal ala Phantom/Axiom/GMGN. Tanpa framework/CDN. */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0e14; --bg2: #11161f; --card: #151b26; --card2: #1a2230;
  --line: #232d3d; --txt: #e8eef5; --mut: #8b98a9; --dim: #5c6b7f;
  --green: #00d084; --red: #ff4d67; --yellow: #f5c518; --blue: #3b82f6;
  --accent: #7c5cff;
}
html, body { background: var(--bg); color: var(--txt); font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 14px; }
body { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 76px; }
a { color: var(--blue); }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; background: var(--bg2); color: var(--txt); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 14px; width: 100%; }
input:focus, select:focus { outline: 1px solid var(--accent); }
h1 { font-size: 18px; letter-spacing: .4px; }
h2 { font-size: 15px; margin: 14px 0 8px; }
h3 { font-size: 14px; }
.mut { color: var(--mut); } .dim { color: var(--dim); }
.green { color: var(--green); } .red { color: var(--red); }
.big { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.mono { font-variant-numeric: tabular-nums; }

/* header */
header { position: sticky; top: 0; z-index: 20; background: rgba(10,14,20,.96); border-bottom: 1px solid var(--line); padding: 12px 14px 8px; }
.head-row { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 900; font-size: 17px; letter-spacing: 1px; }
.logo span { color: var(--accent); }
.badge { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 20px; background: #122b22; color: var(--green); border: 1px solid #1d4a38; }
.badge.warn { background: #2b1a12; color: #ffb020; border-color: #5a3a17; }
.sim-note { font-size: 11px; color: var(--dim); margin-top: 4px; }
main { padding: 12px 14px; }

/* balance card */
.bal-card { background: linear-gradient(135deg, #171d2b, #121826); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.bal-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bal-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.bal-cell { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.bal-cell .lbl { font-size: 11px; color: var(--mut); }
.bal-cell .val { font-size: 14px; font-weight: 700; margin-top: 2px; }

/* tabs */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: #0d1119; border-top: 1px solid var(--line); z-index: 30; }
.tabbar button { flex: 1; background: none; border: none; color: var(--mut); padding: 10px 2px 12px; font-size: 11px; }
.tabbar button.on { color: var(--txt); font-weight: 700; }
.tabbar button .ic { display: block; font-size: 18px; margin-bottom: 2px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sym { font-weight: 800; font-size: 15px; }
.sub { font-size: 12px; color: var(--mut); }
.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.kv b { font-variant-numeric: tabular-nums; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--bg2); border: 1px solid var(--line); color: var(--mut); }
.pill.open { color: var(--green); border-color: #1d4a38; }
.pill.tp { color: var(--green); } .pill.sl { color: var(--red); }
.btn { border: 1px solid var(--line); background: var(--card2); color: var(--txt); border-radius: 9px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.btn.primary { background: var(--green); color: #04120b; border-color: var(--green); }
.btn.danger { background: #2a1218; color: var(--red); border-color: #5a1f2a; }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }
details { margin-top: 8px; }
details summary { cursor: pointer; color: var(--mut); font-size: 12px; padding: 4px 0; }
table.tx { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
table.tx td, table.tx th { padding: 4px 2px; border-bottom: 1px solid var(--line); text-align: right; }
table.tx td:first-child, table.tx th:first-child { text-align: left; }
.rank-row { display: flex; align-items: center; gap: 10px; }
.rank-num { font-size: 20px; font-weight: 900; color: var(--yellow); width: 28px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #00c2ff); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.notice { background: #1a1408; border: 1px solid #5a3a17; color: #ffcf7a; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 10px; }
.notice.ok { background: #0f241c; border-color: #1d4a38; color: #7be3b8; }
.notice.err { background: #2a1218; border-color: #5a1f2a; color: #ff9aa8; }
.hidden { display: none !important; }
.login-wrap { max-width: 480px; margin: 0 auto; padding: 24px 16px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-top: 16px; }
.field { margin: 10px 0; }
.field label { display: block; font-size: 12px; color: var(--mut); margin-bottom: 4px; }
canvas#shareCanvas { display: none; }
.foot { text-align: center; font-size: 11px; color: var(--dim); padding: 14px; }

.logo-img{width:36px;height:36px;border-radius:9px;vertical-align:middle;object-fit:cover}
.logo{display:flex;align-items:center;gap:8px}
