html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #f2f2f7;
  color: #1c1c1e;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
}

.page {
  box-sizing: border-box;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(8px + env(safe-area-inset-top)) 12px calc(28px + env(safe-area-inset-bottom));
}

.up { color: #ff3b30; }
.down { color: #34c759; }
.flat { color: #8e8e93; }

.hero { padding: 12px 4px 16px; }

.kicker {
  color: #8e8e93;
  font-size: 11px;
  letter-spacing: 1px;
}

.hero h1 {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sub {
  margin-top: 4px;
  color: #636366;
  font-size: 14px;
}

.meta {
  display: flex;
  align-items: center;
  margin-top: 10px;
  color: #8e8e93;
  font-size: 12px;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #c7c7cc;
  flex: none;
}

.dot.live { background: #34c759; }

.meta .time { margin-left: 8px; }

.retry {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: #007aff;
  font-size: 12px;
}

.future-card,
.card {
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
}

.future-card {
  display: flex;
  margin-bottom: 14px;
}

.future-item {
  flex: 1;
  padding: 10px 4px 12px;
  text-align: center;
}

.future-item + .future-item { border-left: 1px dashed #d8d8dc; }

.future-name { font-size: 13px; font-weight: 600; }
.future-code { margin-top: 2px; color: #8e8e93; font-size: 11px; }
.future-price { margin-top: 6px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.future-change { margin-top: 2px; font-size: 12px; font-variant-numeric: tabular-nums; }

.notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  color: #8e8e93;
  background: #fff;
  border-radius: 10px;
  font-size: 13px;
}

.group { margin-bottom: 16px; }

.group-title {
  margin: 0 4px 8px;
  color: #8e8e93;
  font-size: 13px;
}

.row {
  display: flex;
  align-items: stretch;
  min-height: 44px;
}

.row.head {
  min-height: 40px;
  color: #8e8e93;
  background: #f7f7fa;
  font-size: 11px;
}

.row.body { border-top: 1px dashed #d8d8dc; }
.row.body:active { background: #f7f7fa; }

.col-name,
.col-num,
.col-delta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.col-name {
  flex: 1.35;
  min-width: 0;
  padding: 8px 6px 8px 10px;
}

.col-num,
.col-delta {
  border-left: 1px dashed #d8d8dc;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.col-num {
  flex: 0.82;
  padding: 8px 4px;
  font-size: 13px;
}

.col-delta {
  flex: 1.05;
  padding: 8px 8px 8px 4px;
  font-size: 13px;
}

.sort {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8e8e93;
  font-size: 11px;
  appearance: none;
}

.sort.on { color: #1c1c1e; font-weight: 600; }

.sorter {
  display: flex;
  flex-direction: column;
  width: 8px;
  margin-left: 3px;
}

.sorter i {
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
}

.sorter .up {
  margin-bottom: 2px;
  border-bottom: 4px solid #c7c7cc;
}

.sorter .down { border-top: 4px solid #c7c7cc; }
.sort.on.asc .sorter .up { border-bottom-color: #007aff; }
.sort.on.desc .sorter .down { border-top-color: #007aff; }

.head-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.code { margin-top: 2px; color: #8e8e93; font-size: 11px; }
.price { font-weight: 600; color: #1c1c1e; }

.expand {
  padding: 8px 10px 12px;
  background: #f7f7fa;
  border-top: 1px dashed #d8d8dc;
}

.hint { margin-bottom: 8px; color: #8e8e93; font-size: 12px; }

.actions { display: flex; gap: 8px; }

.action {
  flex: 1;
  height: 32px;
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  background: #fff;
  color: #1c1c1e;
  font-size: 13px;
}

.footnote {
  padding: 4px 4px 8px;
  color: #aeaeb2;
  font-size: 12px;
  line-height: 1.6;
}

.back {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: none;
  color: #007aff;
  font-size: 16px;
}

.history-title {
  margin: 2px 0 0;
  font-size: 24px;
  font-weight: 700;
}

.stats {
  display: flex;
  margin-bottom: 12px;
  padding: 14px 4px;
}

.stat { flex: 1; text-align: center; }
.stat .label { color: #8e8e93; font-size: 12px; }
.stat .value { margin-top: 4px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

.chart-card { position: relative; margin-bottom: 12px; }
.chart { display: block; width: 100%; height: 200px; }

.empty {
  padding: 36px 16px;
  color: #8e8e93;
  text-align: center;
  line-height: 1.6;
}

.list .line {
  display: flex;
  padding: 10px 12px;
  border-top: 1px solid #f2f2f7;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.list .line.head {
  border-top: none;
  color: #8e8e93;
  font-size: 12px;
}

.list .line.foot { background: #fafafa; font-weight: 600; }
.col-date { flex: 1.2; }
.col-right { flex: 1; text-align: right; }
