:root {
  --paper: #f6f2e9;
  --card: #fffdf8;
  --ink: #27342f;
  --muted: #68746e;
  --line: #d9ded8;
  --green: #2d6a54;
  --green-soft: #dcebe1;
  --amber: #e6b65c;
  --shadow: 0 10px 30px rgba(40, 58, 49, .08);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Georgia, "Times New Roman", serif; }
button { font: inherit; }
.app-shell { width: min(100% - 32px, 720px); margin: 0 auto; padding: 30px 0 45px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 26px; }
.eyebrow { margin: 0 0 7px; color: var(--green); font: 700 12px/1.2 Arial, sans-serif; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(30px, 6vw, 43px); line-height: 1; font-weight: 700; letter-spacing: -.035em; }
.month-link { border: 2px solid var(--green); border-radius: 14px; background: transparent; color: var(--green); min-height: 53px; padding: 8px 14px; display: flex; align-items: center; gap: 8px; font: 700 16px Arial, sans-serif; cursor: pointer; white-space: nowrap; }
.month-link:hover, .month-link:focus-visible { background: var(--green); color: white; }
.month-icon { font-size: 23px; line-height: 1; }
.date-card { background: var(--green); color: white; border-radius: 24px; padding: 27px 28px 24px; box-shadow: var(--shadow); }
.date-label { margin-bottom: 6px; color: #cbe1d3; font: 700 14px Arial, sans-serif; text-transform: uppercase; letter-spacing: .12em; }
.date-card h2 { margin-bottom: 25px; font-size: clamp(25px, 6vw, 39px); line-height: 1.1; text-transform: capitalize; }
.progress-row { display: flex; gap: 14px; align-items: center; }
.progress-track { background: rgba(255,255,255,.25); height: 12px; border-radius: 99px; flex: 1; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #fff; transition: width .25s ease; }
.progress-row strong { font: 700 16px Arial, sans-serif; white-space: nowrap; }
.progress-caption { margin: 10px 0 0; color: #dcebe1; font-size: 16px; }
.rules-section { margin-top: 31px; }
.section-heading { margin-bottom: 15px; }
.section-heading h2 { margin-bottom: 5px; font-size: 27px; }
.section-heading p { margin-bottom: 0; color: var(--muted); font: 16px Arial, sans-serif; }
.rules-list { display: grid; gap: 12px; }
.rule { width: 100%; display: flex; align-items: center; gap: 17px; min-height: 83px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 3px 10px rgba(40,58,49,.03); transition: .18s ease; }
.rule:hover, .rule:focus-visible { border-color: var(--green); transform: translateY(-1px); }
.rule.done { border-color: var(--green); background: var(--green-soft); }
.check { width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; border: 2px solid #95a19a; border-radius: 50%; color: transparent; font: 700 25px Arial, sans-serif; }
.rule.done .check { border-color: var(--green); background: var(--green); color: white; }
.rule-text { display: flex; min-height: 39px; align-items: center; font-size: 22px; line-height: 1.18; }
.rule.done .rule-text { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--green); }
.save-note { margin: 25px 0 0; color: var(--muted); text-align: center; font: 14px Arial, sans-serif; }
.save-note span { color: var(--green); font-weight: bold; margin-right: 4px; }
[hidden] { display: none !important; }
.modal-backdrop { position: fixed; inset: 0; padding: 20px; overflow-y: auto; background: rgba(31, 46, 39, .42); z-index: 5; }
.month-dialog { width: min(100%, 650px); margin: 0 auto; padding: 27px; background: var(--paper); border-radius: 24px; box-shadow: 0 25px 60px rgba(0,0,0,.2); }
.dialog-header { display: flex; justify-content: space-between; align-items: start; }
.dialog-header h2 { margin-bottom: 0; font-size: 31px; text-transform: capitalize; }
.dialog-actions { display: flex; align-items: center; gap: 6px; }
.calendar-nav { width: 40px; height: 40px; padding: 0; border: 2px solid var(--green); border-radius: 10px; background: transparent; color: var(--green); font: 34px/28px Arial, sans-serif; cursor: pointer; }
.calendar-nav:hover, .calendar-nav:focus-visible { background: var(--green); color: white; }
.close-button { border: 0; background: transparent; color: var(--ink); font: 400 38px/1 Arial, sans-serif; cursor: pointer; padding: 0 2px; }
.month-explanation { color: var(--muted); font: 16px Arial, sans-serif; margin: 12px 0 20px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.calendar-weekdays { margin-bottom: 7px; color: var(--muted); text-align: center; font: 700 13px Arial, sans-serif; }
.calendar-day { position: relative; min-height: 57px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; font: 700 17px Arial, sans-serif; }
.calendar-day:hover, .calendar-day:focus-visible { border-color: var(--green); }
.calendar-day.empty { border: 0; background: transparent; cursor: default; }
.calendar-day.today { outline: 3px solid var(--green); outline-offset: 1px; }
.calendar-day.complete { background: var(--green-soft); border-color: var(--green); }
.calendar-day.partial { background: #fff4d9; border-color: var(--amber); }
.day-status { position: absolute; right: 6px; bottom: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.partial .day-status { background: var(--amber); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 20px 0 0; color: var(--muted); font: 14px Arial, sans-serif; }
.legend-dot { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.legend-dot.partial { background: var(--amber); }
.day-detail { margin-top: 20px; padding-top: 19px; border-top: 1px solid var(--line); }
.day-detail h3 { margin-bottom: 12px; font-size: 22px; text-transform: capitalize; }
.detail-list { display: grid; gap: 8px; }
.detail-item { display: flex; gap: 9px; align-items: center; font: 16px Arial, sans-serif; }
.detail-item.done { color: var(--green); }
@media (max-width: 500px) { .app-shell { width: min(100% - 22px, 720px); padding-top: 20px; } .topbar { align-items: start; flex-direction: column; gap: 16px; } .month-link { align-self: stretch; justify-content: center; } .date-card { padding: 23px 20px; } .rule { align-items: center; } .rule-text { font-size: 20px; } .month-dialog { padding: 22px 16px; } .calendar-grid, .calendar-weekdays { gap: 4px; } .calendar-day { min-height: 49px; } }
