:root { --bg:#1e1e1e; --panel:#252526; --bar:#333333; --border:#3c3c3c; --text:#cccccc; --muted:#8b8b8b; --accent:#0e639c; --ok:#3fb950; --bad:#f14c4c; --star:#e3b341; }
* { box-sizing: border-box; }
html, body { height:100%; margin:0; }
body { display:flex; flex-direction:column; background:var(--bg); color:var(--text); font:14px/1.45 -apple-system,"Segoe UI",system-ui,sans-serif; }
button { background:none; border:0; color:inherit; padding:5px 10px; cursor:pointer; font:inherit; border-radius:4px; }
button:hover:not(:disabled) { background:rgba(255,255,255,.1); }
button:disabled { opacity:.35; cursor:default; }
button.primary { background:var(--accent); color:#fff; } button.primary:hover:not(:disabled) { background:#1177bb; }
.muted { color:var(--muted); } .small { font-size:12px; } .error { color:var(--bad); }

#tabbar { display:flex; align-items:flex-end; background:#252526; padding:6px 8px 0; gap:4px; }
#tabs { display:flex; gap:2px; overflow-x:auto; min-width:0; }
.tab { display:flex; align-items:center; gap:8px; max-width:220px; min-width:110px; padding:7px 8px 7px 12px; background:#2d2d2d; color:#9a9a9a; border-radius:8px 8px 0 0; cursor:pointer; white-space:nowrap; }
.tab.active { background:var(--bar); color:#fff; }
.tab .title { flex:1; overflow:hidden; text-overflow:ellipsis; }
.tab .x { padding:0 4px; border-radius:50%; opacity:.6; } .tab .x:hover { background:rgba(255,255,255,.15); opacity:1; }
#newTab { padding:4px 10px; font-size:16px; margin-bottom:3px; }

#toolbar { display:flex; align-items:center; gap:4px; padding:6px 8px; background:var(--bar); }
#omni { flex:1; display:flex; }
#address { flex:1; min-width:0; background:#1e1e1e; border:1px solid transparent; color:#fff; padding:6px 14px; border-radius:16px; font:inherit; outline:none; }
#address:focus { border-color:#007fd4; }
#star { font-size:18px; padding:2px 8px; } #star.on { color:var(--star); }
#account.in { background:rgba(255,255,255,.12); }

#views { flex:1; min-height:0; position:relative; }
.view { position:absolute; inset:0; overflow:auto; display:none; }
.view.active { display:block; }
.page { max-width:900px; margin:0 auto; padding:24px 20px 60px; }
.page h1 { font-size:26px; font-weight:400; margin:6px 0 2px; }
.page h2 { font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:#bbb; font-weight:500; margin:26px 0 10px; }
.searchbox { display:flex; gap:8px; margin:14px 0 4px; }
.searchbox input { flex:1; background:var(--panel); border:1px solid var(--border); color:#fff; padding:10px 16px; border-radius:24px; font:inherit; font-size:16px; outline:none; }
.searchbox input:focus { border-color:#007fd4; }
.chips { display:flex; gap:6px; flex-wrap:wrap; margin:10px 0; }
.chip { font-size:12px; padding:2px 10px; border-radius:12px; background:#333; color:#bbb; }
.chip.ok { background:#1f3d27; color:#7ee787; } .chip.bad { background:#4a1f1f; color:#ff9a9a; } .chip.wait { color:var(--muted); }
.cards { display:grid; gap:10px; }
.card { display:flex; gap:14px; align-items:center; background:var(--panel); border:1px solid var(--border); padding:12px 14px; border-radius:8px; cursor:pointer; }
.card:hover { border-color:#007fd4; background:#2a2d2e; }
.avatar { flex:none; width:44px; height:44px; border-radius:10px; display:grid; place-items:center; font-size:20px; font-weight:600; color:#fff; }
.app-icon { flex:none; width:44px; height:44px; border-radius:10px; object-fit:cover; display:block; background:#2d2d2d; }
.card .body { flex:1; min-width:0; }
.card .name { font-weight:600; color:#fff; font-size:15px; }
.card .desc { color:#b0b0b0; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.card .meta { color:var(--muted); font-size:12px; margin-top:2px; }
.card .star { font-size:18px; } .card .star.on { color:var(--star); }
.empty { color:var(--muted); padding:20px 0; }
.signin-card { background:var(--panel); border:1px dashed var(--border); padding:14px 18px; border-radius:8px; }

.appbar { display:flex; align-items:center; gap:10px; padding:5px 12px; background:#252526; border-bottom:1px solid var(--border); font-size:12px; }
.appbar .grow { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.appframe { display:flex; flex-direction:column; height:100%; }
.appframe iframe { flex:1; width:100%; border:0; background:#fff; }
.loading { height:2px; background:linear-gradient(90deg,#007fd4,#3fb950); animation:slide 1s infinite; transform-origin:left; } @keyframes slide { from { transform:scaleX(.1); } to { transform:scaleX(1); } }

dialog { background:var(--panel); color:var(--text); border:1px solid var(--border); padding:20px; width:480px; max-width:94vw; box-shadow:0 8px 32px rgba(0,0,0,.6); }
dialog::backdrop { background:rgba(0,0,0,.5); }
dialog h3 { margin:0 0 12px; font-weight:500; }
dialog label.field { display:block; margin-bottom:10px; } dialog label.field span { display:block; font-size:12px; color:var(--muted); margin-bottom:3px; }
dialog input[type=text], dialog input[type=password], dialog input[type=email] { width:100%; background:#3c3c3c; border:1px solid transparent; color:#fff; padding:6px 8px; font:inherit; outline:none; }
dialog input:focus { border-color:#007fd4; }
dialog .row { display:flex; gap:8px; justify-content:flex-end; margin-top:14px; align-items:center; }
dialog .row .grow { flex:1; }
.tabsw { display:flex; gap:4px; margin-bottom:12px; } .tabsw button { flex:1; border-bottom:2px solid transparent; border-radius:0; } .tabsw button.on { border-color:#007fd4; color:#fff; }
.nodelist { display:grid; gap:6px; margin:10px 0; }
.noderow { display:flex; align-items:center; gap:8px; background:#2d2d2d; padding:6px 10px; border-radius:6px; }
.noderow .grow { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.dot { width:9px; height:9px; border-radius:50%; background:#666; flex:none; } .dot.on { background:var(--ok); } .dot.off { background:var(--bad); }
#toast { position:fixed; bottom:20px; left:50%; transform:translateX(-50%) translateY(80px); background:#333; padding:10px 18px; border-left:3px solid var(--accent); transition:transform .2s; z-index:50; }
#toast.show { transform:translateX(-50%) translateY(0); } #toast.bad { border-left-color:var(--bad); }

.price-badge { font-size:11px; font-weight:600; padding:2px 8px; border-radius:10px; background:#1f3d27; color:#7ee787; white-space:nowrap; }
.buy-card { max-width:420px; margin:40px auto; background:var(--panel); border:1px solid var(--border); border-radius:10px; padding:22px 24px; text-align:center; }
.buy-card .avatar, .buy-card .app-icon { width:64px; height:64px; border-radius:14px; margin:0 auto; font-size:26px; }
.buy-card .price { font-size:32px; font-weight:600; color:#fff; margin:6px 0 2px; }
.buy-card .split { color:var(--muted); font-size:13px; margin:2px 0 16px; }
.shot-strip { display:flex; gap:8px; overflow-x:auto; margin:14px -4px 0; padding:4px; }
.shot-strip img { height:130px; border-radius:6px; border:1px solid var(--border); object-fit:cover; flex:none; }
.buy-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; padding:6px 0; border-bottom:1px solid var(--border); font-size:13px; }
.buy-row:last-child { border-bottom:0; }
.wallet-select { flex:1; min-width:0; max-width:220px; background:#3c3c3c; color:#fff; border:1px solid var(--border); border-radius:4px; padding:4px 6px; font:12px inherit; }
.wallet-box { background:#2d2d2d; border-radius:6px; padding:10px 12px; margin:10px 0; font:12px Menlo,Consolas,monospace; word-break:break-all; }
.mnemonic-box { background:#2d2d2d; border:1px solid var(--bad); border-radius:6px; padding:10px 12px; margin:10px 0; font:13px/1.6 Menlo,Consolas,monospace; word-break:break-word; }
.spinner { display:inline-block; width:14px; height:14px; border:2px solid rgba(255,255,255,.25); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; vertical-align:-2px; margin-right:6px; }
@keyframes spin { to { transform:rotate(360deg); } }
.hidden { display:none !important; }
.wallet-name-input { display:block; width:100%; background:none; border:1px solid transparent; border-radius:4px; color:#fff; font:inherit; padding:2px 4px; margin:-2px 0 -2px -4px; }
.wallet-name-input:hover { border-color:var(--border); }
.wallet-name-input:focus { background:#1e1e1e; border-color:#007fd4; outline:none; }
