:root {
  color-scheme: light;
  font-family: "DM Sans", system-ui, sans-serif;
  color: #182a23;
  background: #f7f4ee;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main {
  width: min(100% - 2rem, 36rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 8vh, 5rem) 0;
}
header {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: 1.25rem;
  font-weight: 750;
  margin-bottom: 1.5rem;
}
.home-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.75rem;
  color: inherit;
  text-decoration: none;
}
.mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: .65rem;
  background: #184b38;
  color: white;
  font-size: 1.65rem;
  line-height: 1;
}
.panel {
  background: #fffdf9;
  border: 1px solid #dedbd2;
  border-radius: 1.45rem;
  padding: clamp(1.25rem, 5vw, 2.5rem);
  box-shadow: 0 .8rem 2.5rem #182a230d;
}
h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.2rem);
  letter-spacing: -.055em;
  line-height: 1.1;
}
p { color: #49594e; line-height: 1.5; }
form, .actions, #roles { display: grid; gap: .7rem; margin-top: 1.5rem; }
label { font-weight: 650; }
input, select, button, .button {
  min-height: 3.25rem;
  font: inherit;
  border-radius: .75rem;
  padding: .75rem 1rem;
}
input, select { width: 100%; border: 1px solid #87958c; background: white; color: inherit; }
button, .button {
  background: #184b38;
  color: #fff;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.secondary { background: #ebefe8; color: #184b38; border-color: #c5d1c8; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #ba592b; outline-offset: 3px; }

header nav {
  display: flex;
  gap: .65rem;
  margin-left: auto;
}
header nav a {
  align-content: center;
  min-height: 2.75rem;
  color: #184b38;
  font-size: .95rem;
  text-underline-offset: .2rem;
}
.item-entry, .key-actions { display: flex; gap: .65rem; }
.item-entry input { min-width: 0; }
.list-picker { display: grid; gap: .45rem; margin: 1.25rem 0 .75rem; }
#new-list summary { color: #184b38; cursor: pointer; padding: .45rem 0; }
#new-list form { margin-top: .5rem; }
.key-card {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #ebefe8;
  border-radius: .75rem;
}
.key-card p { margin: .35rem 0 .65rem; }
.key-actions { margin-top: .65rem; flex-wrap: wrap; }
.shopping-items {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.shopping-items li {
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid #dedbd2;
}
.shopping-items label {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.25rem;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.shopping-items label span { overflow-wrap: anywhere; }
.shopping-items input {
  width: 1.25rem;
  height: 1.25rem;
  min-height: 0;
  margin: 0;
  flex: none;
  accent-color: #184b38;
}
.shopping-items input:checked + span { text-decoration: line-through; color: #49594e; }
.shopping-items button {
  min-height: 2.75rem;
  padding: .5rem .65rem;
  background: transparent;
  color: #49594e;
  font-size: .85rem;
}

#shopping-lock { margin-top: 1.25rem; }
.month-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.month-bar h2 { font-size: 1.15rem; margin: 0; text-align: center; }
.month-bar button { min-height: 2.75rem; min-width: 2.75rem; padding: .25rem .55rem; font-size: 1.45rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .18rem; }
.weekdays { margin: .75rem 0 .15rem; text-align: center; font-size: clamp(.65rem, 2.6vw, .9rem); color: #49594e; }
.calendar-grid button {
  position: relative;
  min-height: 2.65rem;
  border-radius: .55rem;
  background: #f2f1eb;
  color: #182a23;
  padding: .3rem 0;
}
.calendar-grid button[aria-current="date"] { border-color: #184b38; }
.calendar-grid button[aria-pressed="true"] { background: #184b38; color: white; }
.calendar-grid .has-events::after {
  position: absolute;
  content: "";
  inset: auto calc(50% - .13rem) .25rem;
  height: .26rem;
  border-radius: 50%;
  background: currentColor;
}
#calendar-selected-day { margin: 1.35rem 0 .4rem; font-size: 1.1rem; }
#calendar-events li { justify-content: space-between; }
#calendar-events li span { padding: .55rem 0; min-width: 0; overflow-wrap: anywhere; }
.calendar-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .6rem; }
.calendar-fields input { margin-top: .35rem; min-width: 0; }

header nav { flex-wrap: wrap; justify-content: flex-end; column-gap: .65rem; row-gap: 0; }
.today-date { margin: .5rem 0 1.25rem; }
.today-section { border-top: 1px solid #dedbd2; padding-top: .95rem; margin-top: 1rem; }
.today-section h2 { font-size: 1.15rem; margin: 0; }
.today-section p { margin: .55rem 0 0; }
.today-section-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.today-section-header button { min-height: 2.75rem; padding: .45rem .75rem; font-size: .9rem; }
.today-items { list-style: none; padding: 0; margin: .35rem 0 0; }
.today-items li { display: flex; gap: .65rem; padding: .35rem 0; overflow-wrap: anywhere; }
.today-item-time { flex: none; min-width: 3.5rem; color: #49594e; font-variant-numeric: tabular-nums; }
