.flush { margin-top: 0; }
.card { margin-bottom: 16px; padding: 12px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.warn-box { background: var(--chip); border: 1px solid var(--warn); color: var(--warn); padding: 10px 12px; border-radius: 8px; }
:root { --c1: #0b6e4f; --c2: #1f5fbf; --c3: #b05a00; --c4: #7a3fb0; --c5: #b3261e; --c6: #0a7080; --c-ink: #fff; }
@media (prefers-color-scheme: dark) {
  :root { --c1: #4fc79a; --c2: #7fb0ff; --c3: #f0a35c; --c4: #c79bff; --c5: #ff8a80; --c6: #5fd0e0; --c-ink: #14130f; }
}
.colors { border: 0; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.colors legend { padding: 0; margin-bottom: 4px; }
.swatch { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 4px 10px; border: 2px solid var(--line); border-radius: 99px; cursor: pointer; }
.swatch input { width: 20px; height: 20px; min-height: 0; min-width: 0; padding: 0; margin: 0; flex: none; }
.swatch::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--sw); flex: none; }
.swatch:has(input:checked) { border-color: var(--sw); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.c1 { --sw: var(--c1); } .c2 { --sw: var(--c2); } .c3 { --sw: var(--c3); } .c4 { --sw: var(--c4); } .c5 { --sw: var(--c5); } .c6 { --sw: var(--c6); }
.weeknav { margin-bottom: 12px; }
.week-label { font-weight: 600; text-align: center; min-width: 140px; }
.habit { border-left: 6px solid var(--sw); }
.habit-head { display: flex; justify-content: space-between; gap: 8px; align-items: start; flex-wrap: wrap; }
.habit-head h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 3px; margin: 10px 0; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; min-height: 52px; padding: 2px; font-size: 12px; border-width: 2px; }
.day b { font-size: 16px; }
.day[aria-pressed="true"] { background: var(--sw); color: var(--c-ink); border-color: var(--sw); }
.day:disabled { opacity: .45; cursor: not-allowed; }
.day.today { border-color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 10px; margin: 0; }
.stats div { min-width: 0; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; font-weight: 700; font-size: 16px; }
.spark { display: block; width: 100%; max-width: 240px; height: 40px; margin-top: 8px; }
.spark polyline { fill: none; stroke: var(--sw); stroke-width: 2; }
.spark circle { fill: var(--sw); }
.habit .acts { margin-top: 8px; }
.habit .acts button { font-size: 13px; }

/* 2026-10-30 gate fix: week navigation arrows must be 44x44 touch targets (e2e targets_44) */
#prev-week, #next-week { min-width: 44px; min-height: 44px; }
