design a habit streak screen as one card, 1120x600, centered on warm paper #efe8da with a soft shadow. left panel in a blush gradient: small habit name 'Morning pages' in Fraunces, a huge coral streak number, three stat chips (best, this month, rate) and a dark 'Mark today done' button. right panel: month title 'December 2026', prev/next circles, a monday-first weekday row and a 7-column grid of 56px day circles. done days are filled coral #ff6a4d, today gets a thin ink ring, future days fade. plain html, css and js, no libraries. write grid.js so it builds the month cells from a Set of done days.
start with the shape, not the logic. monday-first offset is (getDay() + 6) % 7. the data is hardcoded here on purpose, a static screen shows if the design holds before any state exists.
// builds one month of day cells. `done` is a Set of day-of-month numbers.
const TODAY = new Date(2026, 11, 18); // fixed for the demo, use new Date() for real
const grid = document.getElementById('grid');
function buildMonth(year, month, done) {
const first = new Date(year, month, 1);
const lead = (first.getDay() + 6) % 7; // monday-first offset
const days = new Date(year, month + 1, 0).getDate();
grid.innerHTML = '';
for (let i = 0; i < lead; i++) {
grid.insertAdjacentHTML('beforeend', '<div class="day pad"></div>');
}
for (let d = 1; d <= days; d++) {
const date = new Date(year, month, d);
const cls = ['day'];
if (done.has(d)) cls.push('done');
if (+date === +TODAY) cls.push('today');
if (date > TODAY) cls.push('future');
grid.insertAdjacentHTML('beforeend',
`<div class="${cls.join(' ')}" role="gridcell"><button type="button">${d}</button></div>`);
}
}
buildMonth(2026, 11, new Set([1, 2, 3, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17]));









