:root {
  color-scheme: light;
  font: 16px system-ui, sans-serif;
  color: #21362b;
  background: #f6f0e6;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
header { background: #fffefa; border-bottom: 1px solid #ded3c2; }
.wrap { width: min(960px, calc(100% - 32px)); margin-inline: auto; }
.bar { min-height: 70px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 10px; }
.brand { color: #65442f; font: bold 1.25rem Georgia, serif; text-decoration: none; margin-right: auto; }
nav { display: flex; gap: 14px; }
nav [aria-current] { font-weight: 700; }
main { padding: 32px 0 18px; }
h1, h2, h3 { font-family: Georgia, serif; margin: 0 0 12px; }
h1 { font-size: clamp(2.15rem, 5vw, 3.3rem); }
p { line-height: 1.6; }
.panel { padding: 20px; margin-top: 16px; border: 1px solid #ded3c2; border-radius: 12px; background: #fffefa; }
.stack { display: grid; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
label { display: grid; gap: 5px; font-weight: 600; }
input, textarea, button { font: inherit; }
input, textarea { width: 100%; padding: 9px; border: 1px solid #9ba99c; border-radius: 6px; }
button {
  padding: 9px 13px; width: fit-content; border: 1px solid #284838; cursor: pointer;
  border-radius: 7px; background: #284838; color: white; font-weight: 650;
}
button.secondary { background: #fffefa; color: #284838; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #a3602e; outline-offset: 3px; }
[hidden] { display: none !important; }
.meta { color: #475b50; font-size: .9rem; }
.copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.record { border-top: 1px solid #e0e3d9; padding-block: 10px; overflow-wrap: anywhere; }
#status { min-height: 2em; padding-bottom: 20px; }
nav { flex-wrap: wrap; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.toolbar { margin-block: 16px; }
.toolbar h2, .row h1 { margin-bottom: 0; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
select { font: inherit; padding: 9px; border: 1px solid #9ba99c; border-radius: 6px; }
dialog { width: min(540px, calc(100% - 30px)); max-height: 90vh; border: 1px solid #ded3c2; border-radius: 12px; padding: 21px; color: #21362b; background: #fffefa; }
dialog::backdrop { background: #192c23b8; }
.form-error { color: #863927; margin: 0; flex-basis: 100%; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fffefa; border-top: 1px solid #ded3c2; border-left: 1px solid #ded3c2; }
.calendar-weekday, .calendar-day { border-right: 1px solid #ded3c2; border-bottom: 1px solid #ded3c2; padding: 5px; min-width: 0; }
.calendar-weekday { text-align: center; font-weight: 700; background: #e8ecdf; }
.calendar-day { min-height: 100px; }
.calendar-day.outside { background: #f0ede2; }
button.calendar-date { border: 0; padding: 4px 6px; background: transparent; color: inherit; }
button.calendar-entry { display: block; width: 100%; text-align: left; margin: 4px 0; padding: 5px; overflow-wrap: anywhere; font-size: .8rem; color: #21362b; background: #e3eee2; border: 0; }
.calendar-entry span { display: block; font-weight: 800; }
button.calendar-entry.work { background: #f1e3c8; }
button.calendar-entry.gathering { background: #f0e3ec; }
button.calendar-entry.closure { background: #f2e3dc; }
.checklist { border: 1px solid #ded3c2; border-radius: 8px; padding: 12px; min-width: 0; }
.checklist ul { list-style: none; padding: 0; }
.checklist li { border-top: 1px solid #ede7db; padding: 7px 0; }
.checklist li label { display: flex; align-items: baseline; gap: 9px; font-weight: 400; overflow-wrap: anywhere; }
.checklist input[type=checkbox] { width: 1rem; accent-color: #284838; flex: none; }
.checklist input:checked + span { text-decoration: line-through; color: #475b50; }
.add-item input { flex: 1; min-width: 120px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; margin: 16px 0; }
.photo-grid figure { margin: 0; overflow-wrap: anywhere; }
.photo-grid figcaption { padding: 5px 0; font-size: .9rem; }
button.photo-button { width: 100%; padding: 0; aspect-ratio: 4 / 3; overflow: hidden; display: block; background: #e8ecdf; }
.photo-button img { width: 100%; height: 100%; display: block; object-fit: cover; }
.full-photo { display: block; width: 100%; max-height: 63vh; object-fit: contain; margin-bottom: 12px; }
@media (max-width: 650px) {
  .bar nav { order: 3; width: 100%; }
  .split { grid-template-columns: 1fr; }
  .calendar-day { min-height: 72px; padding: 2px; }
  button.calendar-entry { font-size: .66rem; padding: 3px; }
  .actions button { min-height: 44px; }
}
.home-hero { display: grid; grid-template-columns: 1fr 1.08fr; align-items: stretch; border-radius: 15px; overflow: hidden; background: #e6ebdd; }
.home-welcome { padding: clamp(26px, 5vw, 52px); align-self: center; }
.home-kicker { margin: 0 0 13px; color: #65442f; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.home-featured { display: grid; min-height: clamp(300px, 34vw, 405px); }
.home-photos { display: grid; grid-template: repeat(2, minmax(0, 1fr)) / minmax(0, 2.2fr) minmax(0, 1fr); gap: 4px; height: 100%; }
.home-photos img:first-child { grid-row: 1 / -1; }
.home-photos img:only-child { grid-column: 1 / -1; }
.home-photo-error { padding: 18px; align-self: center; }
.home-panels { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.home-panels .row h2 { margin-bottom: 12px; }
@media (max-width: 640px) {
  .home-hero, .home-panels { grid-template-columns: 1fr; }
  .home-featured { min-height: clamp(215px, 65vw, 325px); }
  .home-panels { gap: 0; }
}
.home-photos img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.home-photos img:first-child { object-position: 41% 50%; }
.home-photos img:nth-child(2) { object-position: 56% 38%; }
.home-photos img:nth-child(3) { object-position: 50% 70%; }
