:root {
  --pink: #e5638f;
  --pink-soft: #f6dbe6;
  --pink-bg: #fff5f8;
  --ink: #3a2b32;
  --muted: #9a8791;
  --card: #ffffff;
  --shadow: 0 8px 24px rgba(229, 99, 143, 0.12);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--pink-bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 72px;
}

.header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 20px 20px 8px;
}
.header .logo { font-size: 22px; }
.header h1 {
  font-size: 22px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.header .subtitle { color: var(--muted); font-size: 13px; margin-left: auto; }

.content { flex: 1; padding: 8px 16px 16px; }

.stack { display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ink);
}

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

/* 计数环 */
.ring-card { display: flex; flex-direction: column; align-items: center; }
.ring { width: 160px; height: 160px; }
.ring-number { font-size: 34px; font-weight: 700; fill: var(--pink); }
.ring-caption { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* 波形 */
.waveplot {
  width: 100%;
  height: 96px;
  background: linear-gradient(180deg, #fff 0%, #fff8fb 100%);
  border-radius: 12px;
}

/* 主观标注按钮 */
.felt-button {
  border: none;
  background: linear-gradient(135deg, #ef7aa3 0%, #e5638f 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  padding: 16px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.2s ease;
}
.felt-button:active { transform: scale(0.98); }
.felt-button.pending { opacity: 0.6; }

/* 事件列表 */
.event-list, .session-list { list-style: none; margin: 0; padding: 0; }
.event-row, .session-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f3e7ed;
}
.event-row:last-child, .session-row:last-child { border-bottom: none; }
.event-time, .session-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.event-meta { color: var(--muted); font-size: 12px; margin-right: auto; }
.event-score {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--pink-soft);
  padding: 2px 8px;
  border-radius: 10px;
}
.event-score.high { color: #fff; background: var(--pink); }

.session-row { cursor: pointer; }
.session-row.active { background: var(--pink-soft); border-radius: 12px; padding-left: 10px; }

/* 柱状趋势 */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar {
  width: 100%;
  background: linear-gradient(180deg, #ef7aa3 0%, #e5638f 100%);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
}
.bar-val { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* 统计 */
.stats { display: flex; justify-content: space-around; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--pink); }
.stat-label { font-size: 12px; color: var(--muted); }

.about { color: var(--ink); font-size: 14px; line-height: 1.6; margin: 0; }
.about code { color: var(--pink); font-size: 13px; }

code, pre, kbd {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
}

/* 底部导航 */
.navbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid #f3e7ed;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.nav-item {
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.nav-item .nav-icon { font-size: 20px; }
.nav-item.active { color: var(--pink); }
