:root {
  color-scheme: light;
  --bg: #f5f8ff;
  --card: rgba(255,255,255,.92);
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #8aa0bf;
  --brand: #1e5f74;
  --brand2: #28a18c;
  --red: #ef4444;
  --green: #16a34a;
  --amber: #f97316;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}
#app {
  width: min(100%, 460px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px 14px 92px;
}
.page-title { margin: 4px 2px 16px; font-size: 24px; line-height: 1.2; font-weight: 900; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; gap: 14px; }
.card {
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(16, 42, 67, .08);
}
.subtitle { color: var(--muted); font-size: 13px; font-weight: 650; }
.small { font-size: 12px; }
.tiny { margin-top: 3px; color: var(--soft); font-size: 11px; }
.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #102a43 0%, #1e5f74 56%, #28a18c 100%);
  box-shadow: 0 14px 34px rgba(30, 95, 116, .24);
}
.hero:after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -46px;
  width: 160px;
  height: 108px;
  border: 14px solid rgba(255,255,255,.13);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  transform: rotate(-12deg);
}
.hero > * { position: relative; z-index: 1; }
.kicker {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: rgba(255,255,255,.82);
  font-size: 11px;
  font-weight: 800;
}
.hero h1 { margin: 8px 0 4px; font-size: 21px; line-height: 1.2; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-size: 12px;
  font-weight: 800;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #7df7c7; box-shadow: 0 0 0 5px rgba(125,247,199,.15); }
.gain { margin-top: 20px; font-size: 39px; line-height: 1; font-weight: 900; }
.rate-badge {
  min-width: 78px;
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(255,255,255,.14);
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}
.metric-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 9px; margin-top: 18px; }
.metric-block { padding: 11px; border-radius: 13px; background: rgba(255,255,255,.13); }
.metric-block span { display: block; color: rgba(255,255,255,.58); font-size: 12px; font-weight: 700; }
.metric-block b { display: block; margin-top: 5px; font-size: 16px; }
.hint { display: inline-flex; margin-top: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.15); font-size: 12px; font-weight: 800; color: rgba(255,255,255,.82); }
.add-card { margin-bottom: 10px; padding: 12px; }
.add-btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px;
  color: #fff;
  background: linear-gradient(135deg, #12314a 0%, #1f6d78 54%, #2aa88f 100%);
  font-size: 16px;
  font-weight: 850;
}
.fund-card, .fund-row, .limit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 15px;
}
.fund-name { max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 800; }
.change { min-width: 72px; text-align: right; font-size: 17px; font-weight: 850; color: #94a3b8; }
.up { color: var(--red); }
.down { color: var(--green); }
.flat { color: #94a3b8; }
.warn { color: var(--amber); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat { padding: 13px; border-radius: 14px; background: #f8fbff; }
.stat-label { color: var(--soft); font-size: 12px; font-weight: 750; }
.stat-value { margin-top: 5px; font-size: 22px; font-weight: 900; }
.summary-card, .overview { padding: 16px; margin-bottom: 15px; }
.scroll-tabs, .filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chip {
  flex: 0 0 auto;
  border: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: #6b7d8f;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 6px 16px rgba(16,42,67,.06);
}
.chip.active { color: #fff; background: linear-gradient(135deg, #12314a 0%, #1f6d78 58%, #2aa88f 100%); }
.market-head { margin: 0 4px 12px; }
.market-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 12px; }
.metric-card { min-height: 96px; padding: 14px; }
.metric-name { color: var(--muted); font-size: 13px; font-weight: 650; }
.metric-value { margin-top: 14px; font-size: 22px; font-weight: 800; }
.metric-change { margin-top: 6px; font-size: 15px; font-weight: 750; }
.sentiment { margin: 14px 0; padding: 17px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #102a43 0%, #1e5f74 56%, #28a18c 100%); }
.sentiment-title { font-size: 22px; font-weight: 900; }
.gauge { position: relative; width: 260px; height: 140px; margin: 10px auto 0; overflow: hidden; }
.gauge-arc { position: absolute; left: 50%; top: 8px; width: 236px; height: 236px; margin-left: -118px; border-radius: 50%; background: conic-gradient(from 270deg,#ff4565 0deg,#ff7a2f 44deg,#f8dc37 88deg,#7ee77a 132deg,#23d0aa 180deg,transparent 180deg); }
.gauge-inner { position: absolute; left: 50%; top: 32px; width: 188px; height: 188px; margin-left: -94px; border-radius: 50%; background: linear-gradient(135deg, #174a5e 0%, #1d706f 100%); }
.score { position: absolute; inset: 70px 0 auto; text-align: center; font-size: 36px; font-weight: 950; color: #ffbc49; }
.state { position: absolute; inset: 111px 0 auto; text-align: center; font-size: 13px; font-weight: 800; }
.event-table { padding: 8px 13px; }
.event-row { display: grid; grid-template-columns: 55px 48px 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid #edf3fb; }
.event-row:last-child { border-bottom: 0; }
.event-date, .event-time { color: var(--brand); font-size: 12px; font-weight: 800; }
.event-title { font-size: 14px; font-weight: 850; }
.event-impact { margin-top: 3px; color: var(--soft); font-size: 12px; }
.pill { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 850; }
.pill-red { color: #b91c1c; background: #fee2e2; }
.pill-amber { color: #b45309; background: #ffedd5; }
.pill-green { color: #15803d; background: #dcfce7; }
.pill-blue { color: #1d4ed8; background: #dbeafe; }
.profile-card { padding: 28px; text-align: center; margin-bottom: 12px; }
.avatar { width: 58px; height: 58px; margin: 0 auto; display: grid; place-items: center; border-radius: 20px; background: #eff6ff; color: #2563eb; font-size: 26px; font-weight: 900; }
.name { margin-top: 13px; font-size: 19px; font-weight: 850; }
.menu { padding: 17px; margin-bottom: 10px; font-size: 15px; font-weight: 800; }
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 460px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid #edf3fb;
  box-shadow: 0 -10px 26px rgba(16,42,67,.08);
}
.tabbar button { border: 0; background: transparent; color: #64748b; font-size: 11px; font-weight: 750; }
.tabbar img { display: block; width: 23px; height: 23px; margin: 0 auto 3px; opacity: .76; }
.tabbar button.active { color: var(--brand); }
.tabbar button.active img { opacity: 1; }
@media (min-width: 720px) {
  #app { padding-top: 26px; }
  .market-grid { grid-template-columns: repeat(3, 1fr); }
}
