:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1a1d24;
  --sub: #6b7280;
  --line: #e8eaed;
  --accent: #c0392b;
  --high: #e23b3b;
  --mid: #f39c12;
  --low: #f1c40f;
  --info: #27ae60;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.app { max-width: 680px; margin: 0 auto; padding: 16px 16px 40px; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 4px 16px;
}
.title { display: flex; align-items: center; gap: 12px; }
.flag { font-size: 32px; }
.title h1 { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.date { font-size: 13px; color: var(--sub); margin-top: 1px; }
.refresh {
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow);
  font-size: 18px; color: var(--ink); cursor: pointer;
  transition: transform .3s;
}
.refresh:active { transform: rotate(180deg); }

/* 今日要点 */
.summary {
  background: linear-gradient(135deg, #fff5f3, #fffdf5);
  border: 1px solid #f3dcd6;
  border-radius: 14px; padding: 14px 16px; margin-bottom: 18px;
}
.summary-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: var(--accent); background: #fdeae6;
  padding: 2px 8px; border-radius: 6px; margin-bottom: 6px;
}
.summary p { font-size: 14px; color: #4a4f57; }

/* 新闻流 */
.feed { display: flex; flex-direction: column; gap: 12px; }

.news {
  background: var(--card); border-radius: 14px; padding: 16px;
  box-shadow: var(--shadow); cursor: pointer;
  border-left: 3px solid transparent;
  transition: transform .12s ease;
}
.news:active { transform: scale(.99); }
.news.high { border-left-color: var(--high); }
.news.mid  { border-left-color: var(--mid); }
.news.low  { border-left-color: var(--low); }
.news.info { border-left-color: var(--info); }

.news-head { display: flex; align-items: flex-start; gap: 8px; }
.dot { font-size: 10px; line-height: 22px; }
.news-title { font-size: 16px; font-weight: 600; flex: 1; letter-spacing: -.2px; }
.chev { color: var(--sub); font-size: 13px; transition: transform .2s; margin-top: 3px; }
.news.open .chev { transform: rotate(90deg); }

.news-meta { display: flex; gap: 10px; font-size: 12px; color: var(--sub); margin-top: 6px; padding-left: 18px; }

.news-body {
  max-height: 0; overflow: hidden;
  transition: max-height .28s ease, margin .28s ease, opacity .2s;
  opacity: 0; padding-left: 18px;
}
.news.open .news-body { max-height: 600px; opacity: 1; margin-top: 10px; }
.news-body p { font-size: 14px; color: #41454d; }
.news-body a {
  display: inline-block; margin-top: 10px; font-size: 13px;
  color: var(--accent); text-decoration: none; font-weight: 500;
}
.news-body a::after { content: " ↗"; }

/* 骨架屏 */
.skeleton {
  height: 78px; border-radius: 14px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

/* 页脚 */
.foot { text-align: center; margin-top: 28px; }
.foot p { font-size: 12px; color: var(--sub); }
.muted { color: #aab0b8; margin-top: 2px; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117; --card: #1a1d24; --ink: #e8eaed; --sub: #8b919b;
    --line: #2a2e37; --shadow: 0 1px 3px rgba(0,0,0,.3);
  }
  .summary { background: linear-gradient(135deg, #241917, #1f1d16); border-color: #3a2b27; }
  .summary p { color: #c4c8cf; }
  .news-body p { color: #c4c8cf; }
  .skeleton { background: linear-gradient(90deg, #1a1d24 25%, #22262f 37%, #1a1d24 63%); background-size: 400% 100%; }
}
