:root {
  --accent: #1e3a8a; --accent2: #3b82f6; --bg: #f8fafc; --card: #fff;
  --text: #0f172a; --muted: #64748b; --border: #e2e8f0;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif; background: var(--bg); color: var(--text); }
.app-header { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; padding: calc(env(safe-area-inset-top) + 16px) 16px 16px; }
.app-header h1 { margin: 0; font-size: 1.4rem; }
.app-header .sub { margin: 4px 0 0; font-size: .8rem; opacity: .85; }
main { max-width: 720px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.card { background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.stat { background: var(--bg); border-radius: 12px; padding: 12px 8px; text-align: center; }
.stat-icon { font-size: 1.5rem; }
.stat-num { font-size: 1.5rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.stat-label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.session { padding: 10px 0; border-bottom: 1px solid var(--border); }
.session:last-child { border-bottom: none; }
.session-name { font-weight: 700; }
.session-meta { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: none; }
.tl-icon { font-size: 1.2rem; flex: none; }
.tl-body { font-size: .9rem; }
.tl-time { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.empty { color: var(--muted); font-size: .9rem; }
.trends { display: flex; flex-direction: column; gap: 10px; }
.trend-row { display: flex; align-items: center; gap: 12px; }
.trend-label { flex: none; width: 90px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.trend-chart { flex: none; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { border: 1px solid var(--border); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 5px 11px; font-size: .78rem; font-weight: 600; cursor: pointer; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.reflections { display: flex; flex-direction: column; gap: 8px; }
.reflection-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.reflection-head { padding: 12px 14px; cursor: pointer; display: flex; align-items: baseline; gap: 8px; background: var(--bg); }
.reflection-body { padding: 12px 14px; border-top: 1px solid var(--border); }
.reflection-text { font-size: .92rem; line-height: 1.6; margin: 0 0 10px; white-space: normal; }
.reflection-domains { font-size: .78rem; }

/* --- log-series UI/UX標準（共通適用） --------------------------------------- */
/* hidden属性がdisplay指定に負けて非表示が壊れる事故の防止（標準§2 実装ノートA） */
[hidden] { display: none !important; }
/* キーボード操作のフォーカスを常に見えるように（a11y） */
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent2, var(--accent, #7c3aed));
  outline-offset: 2px;
}
/* 全画面フッター（プライバシー/規約は中央 auth.log-series.jp に集約。標準§10） */
.app-footer {
  text-align: center; padding: 20px 12px calc(16px + env(safe-area-inset-bottom));
  color: var(--muted, #71717a); font-size: 0.85rem;
}
.app-footer a { color: var(--muted, #71717a); text-decoration: underline; }
