:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e6e8ec;
  --accent: #2f6feb;
  --green: #17864a;
  --red: #c9372c;
  --orange: #b25e09;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 26px; line-height: 1; }
h1 { margin: 0; font-size: 18px; letter-spacing: .01em; }
.tagline { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.statusbar { display: flex; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.pill {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  animation: pop .3s ease;
}
@keyframes pop { from { transform: scale(.9); opacity: 0 } to { transform: scale(1); opacity: 1 } }

.tabs {
  display: flex;
  gap: 8px;
  padding: 14px 28px 0;
  max-width: 980px;
  margin: 0 auto;
}
.tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}
.tab b { font-weight: 600; margin-left: 6px; color: #9aa1ad; }
.tab:hover { background: #eef0f4; }
.tab.active {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.tab.active b { color: var(--accent); }

.toolbar {
  max-width: 980px;
  margin: 14px auto 0;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.search {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
}
.search svg { width: 16px; height: 16px; fill: none; stroke: #9aa1ad; stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; outline: 0; font: inherit; font-size: 14px; width: 100%; background: transparent; }
.summary { font-size: 12px; color: var(--muted); }

.list {
  max-width: 980px;
  margin: 18px auto 0;
  padding: 0 28px 40px;
}

.day {
  margin: 22px 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.day::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease;
}
.card:hover { border-color: #d3d8e0; }

.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.time { font-variant-numeric: tabular-nums; }
.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge.entry { background: #e7f6ec; color: var(--green); }
.badge.exit { background: #fdeceb; color: var(--red); }
.badge.add { background: #eaf0fe; color: #2f4fd8; }
.badge.update { background: #f1f2f5; color: #566}
.badge.media { background: #fff5e6; color: var(--orange); }

.text {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.text.dim { color: #9aa1ad; font-style: italic; }
.text.clamp {
  max-height: 9.6em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
  mask-image: linear-gradient(180deg, #000 72%, transparent);
}

.actions { margin-top: 8px; display: flex; gap: 12px; font-size: 12px; }
.actions a { color: var(--accent); text-decoration: none; }
.actions a:hover { text-decoration: underline; }

.more {
  display: block;
  margin: 8px auto 0;
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.more:hover { border-color: #c9cfd8; }

.footer { max-width: 980px; margin: 0 auto 40px; padding: 0 28px; text-align: center; }
.hidden { display: none !important; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .tabs, .toolbar, .list, .footer { padding-left: 16px; padding-right: 16px; }
  .tagline { display: none; }
}
