:root { color-scheme: light; font-family: system-ui, sans-serif; color: #23332d; background: #f5f1ea; }
* { box-sizing: border-box; }
body { margin: 0; }
header { padding: 1.5rem max(1.25rem, calc((100% - 1200px) / 2)); background: #dcebe1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
h1, h2, h3, p { margin: 0 0 .65rem; }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: 1.35rem; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; font-weight: 800; color: #537365; }
main { max-width: 1200px; margin: auto; padding: 1.5rem 1.25rem 4rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; margin-bottom: 2rem; }
.card { background: white; border: 1px solid #e1e8e1; border-radius: 1rem; padding: 1.2rem; box-shadow: 0 3px 14px #253c2b0a; }
.login-card { max-width: 430px; }
.card-head { display: flex; align-items: start; justify-content: space-between; gap: .5rem; }
.points { color: #536e54; font-weight: 700; white-space: nowrap; }
.muted, small { color: #68786d; }
.task { display: flex; align-items: start; gap: .7rem; padding: .8rem 0; border-top: 1px solid #eef0eb; }
.task input { width: 1.4rem; height: 1.4rem; accent-color: #42785b; }
.task div { flex: 1; }
.task small { display: block; margin-top: .2rem; }
button { cursor: pointer; background: #315f48; border: 0; border-radius: .65rem; padding: .7rem 1rem; color: white; font: inherit; font-weight: 700; min-height: 44px; }
button:hover { background: #234a36; }
button.secondary { background: #edf2eb; color: #294b39; }
button.link { background: transparent; color: #315f48; padding: .3rem; min-height: 36px; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.reward { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 0; border-top: 1px solid #eef0eb; }
.reward span { flex: 1; }
.panel { margin-bottom: 2rem; }
label { display: block; font-weight: 650; margin: .8rem 0 .3rem; }
input, select { font: inherit; }
input:not([type=checkbox]), select { width: 100%; padding: .7rem; border: 1px solid #b9c9bc; border-radius: .5rem; background: white; }
.days { display: flex; flex-wrap: wrap; gap: .5rem; }
.days label { display: flex; gap: .25rem; align-items: center; font-weight: 400; }
.days input { width: 1.2rem; height: 1.2rem; }
dialog { border: 0; border-radius: 1rem; max-width: min(94vw, 540px); width: 100%; padding: 1.5rem; }
dialog::backdrop { background: #10261ca8; }
dialog .actions { justify-content: flex-end; margin-top: 1.25rem; }
#message:not(:empty) { padding: .8rem 1rem; background: #fff3cf; border-radius: .6rem; margin-bottom: 1rem; }
ul { padding-left: 1.2rem; }
.history-heading { align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.history-nav { justify-content: flex-end; }
.history-nav button:disabled { cursor: not-allowed; opacity: .5; }
.history-filters { border: 1px solid #e1e8e1; border-radius: .7rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 1rem 0; padding: .3rem .8rem .7rem; }
.history-filters legend { font-weight: 700; padding: 0 .35rem; }
.history-filters label { align-items: center; display: flex; gap: .4rem; margin: .35rem 0 0; }
.history-filters .history-all { margin-top: .35rem; min-height: 36px; padding: .35rem .7rem; }
.history-filters .history-all[aria-pressed="true"] { background: #dcebe1; }
.history-filters input { accent-color: #42785b; height: 1.15rem; width: 1.15rem; }
.history-note { margin: .5rem 0 1rem; }
.history-member { margin-top: 1.5rem; }
.history-table-wrap { overflow-x: auto; overscroll-behavior-inline: contain; }
.history-grid { border-collapse: separate; border-spacing: 0; min-width: 760px; width: 100%; }
.history-grid caption { color: #68786d; padding: 0 0 .5rem; text-align: left; }
.history-grid th, .history-grid td { border-bottom: 1px solid #eef0eb; padding: .35rem; text-align: center; }
.history-grid thead th { background: #f7f8f5; font-size: .85rem; min-width: 82px; }
.history-grid thead th span, .history-grid thead th time { display: block; white-space: nowrap; }
.history-grid thead th:first-child, .history-grid tbody th { left: 0; min-width: 130px; position: sticky; text-align: left; z-index: 1; }
.history-grid thead th:first-child { background: #f7f8f5; }
.history-grid tbody th { background: white; }
.history-grid .history-today { background: #e6f1e8; }
.history-cell { align-items: center; border-radius: .45rem; display: inline-flex; font-size: .78rem; justify-content: center; min-height: 38px; min-width: 76px; padding: .35rem; white-space: nowrap; }
button.history-cell { border: 1px solid transparent; font-weight: 650; }
button.history-cell:hover { border-color: #315f48; }
.status-done { background: #dcebe1; color: #214833; }
.status-excused { background: #fff0cf; color: #705018; }
.status-unmarked { background: #f2f3ef; color: #536057; }
.status-unscheduled, .status-before-start, .status-after-archive, .status-future { background: #f8f8f6; color: #879188; }
@media (max-width: 600px) {
  .history-nav { justify-content: flex-start; }
  .history-nav button { flex: 1; padding-inline: .5rem; }
  .history-grid { min-width: 720px; }
}
