:root {
  --pink: #fb7299;
  --blue: #00a1d6;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #8a919f;
  --border: #ebedf0;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-text-size-adjust: 100%;
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--pink); color: #fff;
  padding-top: max(12px, env(safe-area-inset-top));
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 600; margin-right: auto; }
/* 顶部监控开关 */
.switch { position: relative; width: 42px; height: 24px; flex: none; margin-right: 8px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(255,255,255,.35); border-radius: 999px; transition: .2s;
}
.switch .slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: #2fbf6b; }
.switch input:checked + .slider::before { transform: translateX(18px); }
.monitor-text { font-size: 12px; min-width: 42px; margin-right: 8px; opacity: .95; }
.monitor-text.paused { opacity: .7; }
.pill {
  font-size: 12px; background: rgba(255,255,255,.22);
  padding: 3px 10px; border-radius: 999px;
}
.tabs {
  display: flex; position: sticky; top: 48px; z-index: 9;
  background: var(--card); border-bottom: 1px solid var(--border);
}
.tab {
  flex: 1; padding: 12px 0; border: none; background: none;
  font-size: 15px; color: var(--muted); cursor: pointer; position: relative;
}
.tab.active { color: var(--pink); font-weight: 600; }
.tab.active::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 32px; height: 3px; background: var(--pink); border-radius: 3px;
}
.badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  font-size: 11px; background: #ff4d4f; color: #fff; border-radius: 999px;
  padding: 0 5px; margin-left: 4px; font-style: normal;
}
main { padding: 12px; max-width: 720px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.meta { color: var(--muted); font-size: 12px; margin-left: auto; }
.btn {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  padding: 8px 14px; border-radius: 8px; font-size: 14px; cursor: pointer;
}
.btn.primary { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn.ghost { color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 10px; font-size: 15px; }
.row { display: flex; gap: 8px; margin-bottom: 10px; }
select, input[type="text"], input[type="number"], textarea {
  flex: 1; width: 100%; padding: 9px 10px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff;
}
#set-interval { max-width: 160px; flex: none; }
textarea { resize: vertical; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 8px 0 0; }
.notice {
  margin: 10px 0 0; padding: 9px 11px; font-size: 12px; line-height: 1.65;
  background: #fff7e6; border: 1px solid #ffe0a3; border-radius: 8px; color: #8a5a00;
}
.empty { color: var(--muted); text-align: center; padding: 30px 0; }
.item {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; display: flex; gap: 12px; align-items: flex-start;
}
.item.unread { border-left: 3px solid var(--pink); }
.item .cover { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #eee; }
.item .body { flex: 1; min-width: 0; }
.item .head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.item .plat { font-size: 11px; padding: 1px 7px; border-radius: 4px; color: #fff; }
.plat.bilibili { background: var(--pink); }
.plat.zhihu { background: #0066ff; }
.item .type { font-size: 11px; color: var(--muted); background: #f0f1f3; padding: 1px 7px; border-radius: 4px; }
.item .title { font-size: 15px; font-weight: 600; margin: 2px 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .title a { color: var(--text); text-decoration: none; }
.item .summary { font-size: 13px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.item .who { font-size: 12px; color: var(--muted); }
.item .time { font-size: 12px; color: var(--muted); margin-left: auto; }
.item .read-btn { font-size: 12px; color: var(--blue); background: none; border: none; cursor: pointer; padding: 0; }
.follow {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; display: flex; align-items: center; gap: 12px;
}
.follow .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #eee; flex-shrink: 0; }
.follow .info { flex: 1; min-width: 0; }
.follow .name { font-weight: 600; font-size: 15px; }
.follow .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow .del { color: #ff4d4f; background: none; border: none; cursor: pointer; font-size: 13px; }
label { display: block; font-size: 13px; margin: 10px 0 4px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.status-box { background: #f7f8fa; border-radius: 8px; padding: 10px; font-size: 12px; white-space: pre-wrap; margin: 0; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 14px; z-index: 50; max-width: 90%;
}
