html, body { margin: 0; min-height: 100%; background: #0f1115; color: #e8ecf1; font-family: system-ui, sans-serif; }
#app { max-width: 960px; margin: 0 auto; padding: 24px; }
h1 { margin: 0 0 4px; font-size: 1.7rem; }
h2 { font-size: 1rem; margin: 0 0 12px; color: #aab3c0; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.meta { color: #8b95a5; font-size: .85rem; }
.bar { height: 8px; background: #1c2029; border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.fill { height: 100%; background: linear-gradient(90deg, #22c55e, #4ade80); transition: width .3s; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters #search { flex: 1 1 200px; }
.list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.fx-card + .fx-card { margin-top: 12px; }
.habit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.habit.sel { outline: 1px solid #3b82f6; }
.habit.inactive { opacity: .6; }
.info { flex: 1 1 160px; cursor: pointer; min-width: 0; }
.info:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 4px; }
.hname { font-weight: 600; overflow-wrap: anywhere; }
.wprog { height: 6px; background: #1c2029; border-radius: 99px; overflow: hidden; margin: 6px 0 2px; max-width: 220px; }
.wfill { height: 100%; transition: width .3s; }
.badges { display: flex; gap: 6px; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.check { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--c, #4ade80); background: transparent; color: #0f1115; font-size: 1.2rem; font-weight: bold; cursor: pointer; transition: background .15s, transform .1s; }
.check:hover { transform: scale(1.08); }
.check.on { background: var(--c, #4ade80); }
.check:focus-visible, .day:focus-visible, .cell:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.detail { flex-basis: 100%; padding-top: 10px; border-top: 1px solid #262b36; overflow-x: auto; }
.days { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 10px; }
.day { width: 32px; height: 32px; border-radius: 6px; border: 1px solid #2a303c; background: #171a21; color: #8b95a5; cursor: pointer; position: relative; }
.day.on { background: var(--c, #4ade80); color: #0f1115; font-weight: 700; border-color: transparent; }
.day.noted::after { content: ""; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; }
.backfill { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.notes { margin: 4px 0 14px; padding-left: 18px; font-size: .85rem; color: #aab3c0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 12px; }
.stat { background: #171a21; border-radius: 8px; padding: 8px 10px; }
.sv { font-size: 1.2rem; font-weight: 700; }
.trend { margin-bottom: 12px; }
.trendhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.trend .fx-btn.active { outline: 1px solid #3b82f6; }
.chart { width: 100%; max-width: 560px; height: auto; display: block; margin-top: 6px; }
.heat { display: flex; gap: 3px; overflow-x: auto; padding: 3px 3px 6px; }
.hcol { display: flex; flex-direction: column; gap: 3px; }
.cell { width: 13px; height: 13px; border-radius: 3px; background: #1c2029; display: inline-block; }
.cell[role="button"] { cursor: pointer; }
.cell.l-1 { background: transparent; }
.cell.l1 { background: #14532d; }
.cell.l2 { background: #15803d; }
.cell.l3 { background: #22c55e; }
.cell.l4 { background: #4ade80; }
.legend { display: flex; align-items: center; gap: 4px; margin-top: 10px; color: #8b95a5; font-size: .75rem; }
.empty { text-align: center; padding: 28px; color: #aab3c0; }
.form { display: flex; flex-direction: column; gap: 8px; }
.form label { font-size: .85rem; color: #aab3c0; }
.form .chk { display: flex; align-items: center; gap: 6px; color: #e8ecf1; font-size: .95rem; }
.presets { display: flex; flex-wrap: wrap; gap: 4px; }
.presets .fx-btn { padding: 2px 8px; }
.err { color: #f87171; font-size: .85rem; min-height: 1em; }
kbd { background: #1c2029; border: 1px solid #2a303c; border-radius: 4px; padding: 1px 6px; font-size: .8rem; }
footer.toolbar { margin-top: 20px; }
button:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 560px) {
  #app { padding: 14px; }
  .acts { width: 100%; }
}
</parameter>
