:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #86868b;
  --border: #e8e8ed;
  --accent: #0071e3;
  --up: #c8241c;
  --down: #0a7d33;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --muted: #98989d;
    --border: #2c2c2e;
    --accent: #2997ff;
    --up: #ff5a52;
    --down: #3ecf6e;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 1020px; margin: 0 auto; padding: 40px 24px 60px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 8px; }
.date { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.5px; margin: 0; }
.clock { font-size: 40px; font-weight: 300; font-variant-numeric: tabular-nums; }
h2 { font-size: 21px; font-weight: 700; margin: 36px 0 14px; }
h3.group-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 0 8px; letter-spacing: 0.4px; }
section { margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

.market-strip { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill {
  font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.pill.open { color: var(--down); border-color: var(--down); }
.updated { font-size: 13px; color: var(--muted); margin-left: 4px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 20px; box-shadow: var(--shadow);
}
.brief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.brief h3 { margin: 0 0 4px; font-size: 17px; }
.brief time { font-size: 13px; color: var(--muted); }
.brief p.body { font-size: 15px; line-height: 1.7; margin: 10px 0 0; white-space: pre-wrap; }
.brief .empty { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 8px 0 0; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.text-btn { background: none; border: none; color: var(--accent); font-size: 15px; cursor: pointer; padding: 4px 0; }
.editor { margin-bottom: 12px; }
.editor-row { display: flex; gap: 8px; }
.editor-row select, .editor-row input {
  font-size: 15px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.editor-row input { flex: 1; min-width: 0; }
.editor-row button {
  font-size: 15px; padding: 9px 18px; border-radius: 10px; border: none;
  background: var(--accent); color: #fff; cursor: pointer;
}

.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.stock { position: relative; padding: 16px 18px; }
.stock .name { font-size: 16px; font-weight: 600; }
.stock .code { font-size: 12px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.stock .price { font-size: 28px; font-weight: 600; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.stock .chg { font-size: 14px; font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.stock svg { display: block; margin-top: 10px; }
.stock .remove {
  position: absolute; top: 10px; right: 12px; border: none; background: none;
  color: var(--muted); font-size: 16px; cursor: pointer; padding: 2px 6px;
}
.stock .stale { font-size: 12px; color: var(--muted); }

.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.nav-tile {
  display: block; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 20px 16px; box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.nav-tile:hover { transform: translateY(-2px); }
.nav-tile .icon { font-size: 28px; }
.nav-tile .label { font-size: 15px; font-weight: 600; margin-top: 10px; }
.nav-tile .note { font-size: 12px; color: var(--muted); margin-top: 3px; }

.news-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.news-list { display: flex; flex-direction: column; gap: 2px; }
.news-item { display: block; text-decoration: none; color: var(--text); padding: 10px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-item .t { font-size: 15px; line-height: 1.5; }
.news-item .m { font-size: 12px; color: var(--muted); margin-top: 3px; }
.news-item:hover .t { color: var(--accent); }

footer { margin-top: 48px; text-align: center; font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .brief-grid, .news-cols { grid-template-columns: 1fr; }
  h1, .clock { font-size: 30px; }
  main { padding: 28px 16px 48px; }
}
