:root {
  --bg: #000;
  --text: #fff;
  --sec: rgba(235,235,245,0.6);
  --ter: rgba(235,235,245,0.3);
  --sep: rgba(84,84,88,0.55);
  --card: #1c1c1e;
  --card2: #2c2c2e;
  --green: #00d35a;
  --red: #ff453a;
  --orange: #ff9f0a;
  --cyan: #64d2ff;
  --blue: #0a84ff;
  --yellow: #ffd60a;
  --pink: #ff6b9a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100%; }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); padding-top: env(safe-area-inset-top); }
#app { padding: 0 16px 24px; min-height: 80vh; }
.err { background: #3a0a0a; color: var(--red); padding: 10px 16px; font-size: 13px; }
.hidden { display: none !important; }
.nav { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.nav h1 { font-size: 17px; font-weight: 600; margin: 0; flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--card2); border: 0; color: #fff; }
.search { flex: 1; background: var(--card); color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; font-size: 15px; min-height: 44px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 12px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace; }
.pill.paper { background: rgba(255,159,10,0.18); color: var(--orange); }
.pill.green { background: rgba(0,211,90,0.15); color: var(--green); }
.pill.red { background: rgba(255,69,58,0.15); color: var(--red); }
.balance { font-family: "SF Pro Display", -apple-system, sans-serif; font-size: 66px; font-weight: 600;
  letter-spacing: -2px; font-variant-numeric: tabular-nums; line-height: 1; margin: 8px 0 4px; }
.sub { color: var(--sec); font-variant-numeric: tabular-nums; font-size: 15px; }
.row { display: flex; align-items: center; gap: 8px; }
canvas { width: 100%; display: block; }
.ranges { display: flex; gap: 6px; margin: 8px 0 16px; }
.ranges button { flex: 1; min-height: 44px; background: transparent; color: var(--sec); border: 0; font-size: 13px; }
.ranges button.on { color: #fff; }
h2 { font-size: 20px; font-weight: 600; margin: 20px 0 10px; }
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.acard { flex: 0 0 calc(100% - 0px); scroll-snap-align: start; background: var(--card);
  border-radius: calc(42 * (100vw - 32px) / 504 * 1px); padding: 16px; aspect-ratio: 504 / 470;
  min-height: 200px; }
.acard .title { font-size: 15px; color: var(--sec); }
.acard .big { font-size: 22px; font-weight: 600; margin: 6px 0; }
.feed { font-size: 13px; color: var(--sec); }
.kill { color: var(--ter); text-decoration: line-through; }
.kill .why { color: var(--red); text-decoration: none; float: right; }
.alist { list-style: none; padding: 0; margin: 0; }
.alist li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0;
  border-bottom: 0.5px solid var(--sep); min-height: 44px; }
.alist .t { font-weight: 500; }
.alist .s { color: var(--sec); font-size: 13px; }
.alist .v { font-variant-numeric: tabular-nums; color: var(--sec); text-align: right; }
.card { background: var(--card); border-radius: 16px; padding: 16px; margin: 10px 0; }
.fullbtn { display: block; width: 100%; min-height: 48px; border: 0; border-radius: 14px;
  background: var(--blue); color: #fff; font-size: 17px; font-weight: 600; text-align: center;
  line-height: 48px; text-decoration: none; margin-top: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--green); }
.dot.off { background: var(--ter); }
.layer { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 0.5px solid var(--sep);
  font-variant-numeric: tabular-nums; }
.ok { color: var(--green); }
.bad { color: var(--red); }
.grey { color: var(--ter); }
.price { font-size: 40px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: "SF Pro Display", -apple-system, sans-serif; }
.stat { flex: 1; }
.stat .l { color: var(--sec); font-size: 12px; }
.stat .n { font-variant-numeric: tabular-nums; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex;
  background: rgba(20,20,20,0.86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 0.5px solid var(--sep); }
.tabbar button { flex: 1; min-height: 44px; border: 0; background: transparent; color: var(--sec); font-size: 11px; }
.tabbar button.on { color: var(--blue); }
.pulse { animation: pulse 1.2s ease-in-out infinite; background: var(--card); border-radius: 12px; height: 24px; }
@keyframes pulse { 0%,100% { opacity: .5 } 50% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.setrow { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 0.5px solid var(--sep); font-size: 14px; }
.setrow span:last-child { font-variant-numeric: tabular-nums; color: var(--sec); }
.ro { color: var(--ter); font-size: 12px; margin-top: 8px; }
