.news-hero { padding: 56px 0 28px; position: relative; overflow: hidden; }
.news-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 35%, transparent), transparent 70%); pointer-events: none; }
.news-title { font-size: clamp(2rem, 5vw, 3.2rem); }
.news-sub { color: var(--muted); margin: 10px 0 24px; max-width: 620px; }
.news-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.news-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; display: flex; align-items: baseline; gap: 6px; }
.news-stats strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.news-stats span { color: var(--muted); font-size: .85rem; }

.toolbar { position: sticky; top: 64px; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 12px 0 10px; }
.toolbar-row { display: flex; gap: 10px; }
.search { flex: 1; min-width: 0; }
.search input, #range { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 14px; }
#range { width: auto; cursor: pointer; }
#range option { background: var(--bg); }
.search input:focus, #range:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.icon-btn { flex: none; width: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.1rem; cursor: pointer; }
.icon-btn.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cats { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: .9rem; }
.cat.active { background: linear-gradient(90deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }
.cat .n { opacity: .7; margin-left: 4px; font-size: .8em; }

.news-body { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 24px 0 64px; align-items: start; }
.sources { position: sticky; top: 180px; }
.sources h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.sources ul { list-style: none; display: grid; gap: 2px; }
.src-btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; border: 0; background: none; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.src-btn:hover { background: var(--surface); }
.src-btn.active { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.src-btn .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.src-btn .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-btn .count { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.src-btn .count.err { color: #f87171; }
.src-btn .count.loading::after { content: "…"; }

.feed { display: grid; gap: 0; }
.day { font-size: .85rem; font-weight: 700; color: var(--accent); padding: 18px 0 8px; border-bottom: 1px solid var(--border); }
.day:first-child { padding-top: 0; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; }
.new { color: #fff; background: #ef4444; border-radius: 4px; padding: 0 5px; font-size: .7rem; font-weight: 700; }
.item h3 { font-size: 1.05rem; line-height: 1.5; font-weight: 650; }
.item h3 a:hover { color: var(--accent); }
.item h3 a:visited { color: var(--muted); }
.item p { color: var(--muted); font-size: .9rem; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .extra a { color: var(--accent); }
.thumb { width: 132px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--surface); border: 1px solid var(--border); }
mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

.skeleton { height: 92px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.skeleton::before, .skeleton::after { content: ""; position: absolute; left: 0; height: 14px; border-radius: 6px; background: var(--surface); }
.skeleton::before { top: 20px; width: 70%; }
.skeleton::after { top: 48px; width: 45%; }
.empty { text-align: center; color: var(--muted); padding: 64px 0; }
.more { display: block; margin: 28px auto 0; color: var(--text); }

@media (max-width: 860px) {
  .news-body { grid-template-columns: 1fr; }
  .sources { position: static; }
  .sources h2 { display: none; }
  .sources ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .src-btn { white-space: nowrap; border: 1px solid var(--border); }
  .thumb { width: 88px; height: 64px; }
  .toolbar { top: 64px; }
}
@media (max-width: 480px) {
  .thumb { display: none; }
  .item { grid-template-columns: 1fr; }
}
.news-body > * { min-width: 0; }
@media (max-width: 560px) {
  .news-hero { padding: 36px 0 20px; }
  .news-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .news-stats > div { padding: 8px 12px; }
  #range { padding-inline: 8px; }
}

/* ---- 工具栏按钮 ---- */
.tool-btns { display: flex; gap: 8px; flex: none; }
.pill-btn { flex: none; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.pill-btn.on { color: #fff; background: var(--primary); border-color: transparent; }
.cat-saved { margin-left: auto; }
.cat-saved:not(.active) { color: #f59e0b; }

/* ---- 热点话题 ---- */
.topics { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.topics-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.topics-head h2 { font-size: 1rem; }
.topics-head .hint { color: var(--muted); font-size: .8rem; }
.topics-list { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { --heat: .3; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88rem; color: var(--text);
  border: 1px solid color-mix(in srgb, #f97316 calc(var(--heat) * 70%), var(--border));
  background: color-mix(in srgb, #f97316 calc(var(--heat) * 22%), transparent); transition: transform .15s; }
.topic:hover { transform: translateY(-1px); }
.topic.active { background: linear-gradient(90deg, #f97316, #ef4444); color: #fff; border-color: transparent; }
.topic .n { font-size: .75rem; opacity: .75; font-variant-numeric: tabular-nums; }
.topic .rank { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: .65rem; font-weight: 800; color: #fff; background: #ef4444; }
.topic.active .rank { background: rgba(255,255,255,.3); }

/* ---- 列表头 ---- */
.feed-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .85rem; padding-bottom: 6px; }
#feed-filters { display: contents; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 1px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.chip:hover { border-color: #ef4444; }
.link-btn { margin-left: auto; border: 0; background: none; color: var(--accent); font: inherit; font-size: .85rem; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---- 条目：已读 / 操作 ---- */
.item.read h3 a, .item h3 a:visited { color: var(--muted); font-weight: 500; }
.item.read .thumb { opacity: .55; }
.actions { margin-left: auto; display: inline-flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.item:hover .actions, .item:focus-within .actions, .act.save.on { opacity: 1; }
.act.save.on ~ .act { opacity: 0; }
.item:hover .act.save.on ~ .act { opacity: 1; }
.act { width: 26px; height: 26px; border-radius: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .95rem; line-height: 1; }
.act:hover { background: var(--surface); color: var(--text); }
.act.save.on { color: #f59e0b; }
@media (hover: none) { .actions, .actions .act { opacity: 1 !important; } }

/* ---- 紧凑视图 ---- */
.feed.compact .item { padding: 9px 0; gap: 0; }
.feed.compact .item-main { display: flex; flex-direction: column-reverse; }
.feed.compact .meta { margin: 2px 0 0; }
.feed.compact h3 { font-size: .98rem; }

/* ---- 新资讯提示条 / Toast ---- */
.new-bar { position: fixed; top: 176px; left: 50%; transform: translateX(-50%); z-index: 45; border: 0; border-radius: 999px; padding: 8px 18px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); color: #fff; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.3); animation: drop .3s ease; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px); } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 10px; font-size: .9rem; transition: all .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .toolbar-row { flex-wrap: wrap; }
  .search { flex-basis: 100%; }
  #range { flex: 1; }
  .new-bar { top: 220px; }
  .cat-saved { margin-left: 0; }
}
@media (max-width: 640px) {
  .topics { padding: 12px; }
  .topics-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .topics-list::-webkit-scrollbar { display: none; }
  .topic { flex: none; }
}

/* ---- 键盘焦点 ---- */
.item.focused { box-shadow: inset 3px 0 0 var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%); padding-left: 14px; margin-left: -14px; padding-right: 0; border-radius: 4px; }
.item.focused .actions { opacity: 1; }

/* ---- 分享视图 chip ---- */
.chip-share { color: var(--accent); }
.chip-share:hover { border-color: var(--accent); }

/* ---- 安装 / 离线 / 回到顶部 ---- */
.install-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; height: 36px; padding: 0 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.install-btn:hover { border-color: var(--accent); }
.offline { background: #b45309; color: #fff; text-align: center; font-size: .85rem; padding: 6px 16px; }
.to-top { position: fixed; right: 20px; bottom: 24px; z-index: 45; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-alt); color: var(--text); font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow); }
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ---- 快捷键帮助 ---- */
.help { margin: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-alt); color: var(--text); padding: 24px 28px; width: min(380px, 100% - 32px); }
.help::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }
.help h2 { font-size: 1.15rem; margin-bottom: 14px; }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin-bottom: 20px; font-size: .92rem; }
.help dd { color: var(--muted); }
kbd { display: inline-block; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--surface); font: .8rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.help .btn { width: 100%; color: var(--text); }
@media (hover: none) { #help-btn { display: none; } }
.news-stats strong { white-space: nowrap; }
@media (max-width: 560px) {
  .news-stats > div { flex-direction: column; align-items: flex-start; gap: 0; }
}
