:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17231f;
  --muted: #6f7770;
  --line: #ded8cc;
  --brand: #1e4f46;
  --brand-soft: #dfece8;
  --accent: #d95f43;
  --accent-soft: #f4ddd5;
  --done: #7b8d86;
  --shadow: 0 18px 50px rgba(44, 39, 31, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 24px;
}

.sidebar {
  display: flex;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.62);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 20px;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, var(--accent), transparent 54%),
    var(--brand);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button,
.segmented button,
.ghost-button,
.primary-button,
.view-switch button,
.section-date-button {
  border: 0;
  border-radius: 8px;
}

.nav button {
  padding: 12px 14px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.reserved-nav {
  margin-top: 12px;
}

.reserved-nav button.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-entry {
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.account-entry:hover {
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.account-entry:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 24%, transparent);
  outline-offset: 3px;
}

.user-card > div {
  min-width: 0;
  flex: 1;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-weight: 800;
}

.user-card strong,
.user-card span {
  display: block;
}

.user-card span {
  color: var(--muted);
  font-size: 13px;
}

.user-card em {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
}

.user-action {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  padding: 0 10px;
  white-space: nowrap;
}

.user-action.primary {
  background: var(--brand);
  color: white;
}

.main {
  width: min(1120px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 44px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.section-date-button {
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
}

.section-date-button:hover {
  color: var(--brand);
}

.inline-add input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
}

.hidden-date-picker {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.view-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  justify-self: center;
  gap: 6px;
  padding: 5px;
  border-radius: 8px;
  background: #ebe5d9;
}

.view-switch button {
  min-height: 38px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.view-switch button.active {
  background: var(--surface-strong);
  color: var(--brand);
  box-shadow: 0 4px 14px rgba(44, 39, 31, 0.1);
}

.content-stack {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2 {
  margin-top: 4px;
  font-size: clamp(22px, 3vw, 30px);
}

.count-pill,
.date-tag,
.item time {
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.count-pill {
  padding: 7px 10px;
  white-space: nowrap;
}

.item-list {
  display: grid;
  gap: 10px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
}

.list-stats {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  white-space: nowrap;
}

.list-stats strong {
  color: var(--ink);
  font-size: 18px;
}

.item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 22px rgba(44, 39, 31, 0.05);
}

.item.dragging {
  opacity: 0.5;
}

.item.completed {
  background: #f2f3ef;
}

.item.completed .item-title-row strong {
  color: var(--done);
  text-decoration: line-through;
}

.check-button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.check-button.checked {
  border-color: var(--brand);
  background: var(--brand);
}

.check-button.checked::after {
  content: "";
  display: block;
  width: 9px;
  height: 5px;
  margin: 7px auto;
  transform: rotate(-45deg);
  border-bottom: 2px solid white;
  border-left: 2px solid white;
}

.item-body {
  min-width: 0;
}

.item-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.item-title-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-body > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.item-open > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.item time,
.date-tag {
  flex: 0 0 auto;
  padding: 4px 8px;
}

.ghost-button {
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
}

.ghost-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.54);
  color: var(--muted);
  text-align: center;
}

.primary-button {
  min-height: 42px;
  background: var(--brand);
  color: white;
  font-weight: 700;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
  padding: 5px;
  border-radius: 8px;
  background: #ebe5d9;
}

.segmented.compact {
  width: min(390px, 100%);
  margin-top: 0;
}

.segmented button {
  min-height: 34px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.segmented button.active {
  background: var(--surface-strong);
  color: var(--brand);
  box-shadow: 0 4px 14px rgba(44, 39, 31, 0.1);
}

.week-layout {
  display: grid;
  gap: 18px;
}

.month-layout {
  display: grid;
  gap: 18px;
}

.month-heading h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 8px;
}

.weekday {
  padding: 0 8px 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.month-day {
  display: grid;
  min-height: 128px;
  align-content: start;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  text-align: left;
}

.month-day.muted {
  opacity: 0.45;
}

.month-day.active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.month-day[data-calendar-date],
.day-card[data-calendar-date] {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.month-day[data-calendar-date]:has(.calendar-event.dragging),
.day-card[data-calendar-date]:has(.calendar-event.dragging) {
  border-color: var(--brand);
}

.month-day span {
  font-weight: 800;
}

.calendar-cell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cell-date {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.cell-date span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.cell-add {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.cell-add:hover {
  background: var(--brand);
  color: white;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-card {
  display: grid;
  min-height: 340px;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  text-align: left;
}

.day-card.active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.day-card small {
  color: var(--muted);
  font-size: 12px;
}

.calendar-items {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.calendar-event,
.calendar-items strong {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 22px;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  border: 0;
  text-align: left;
}

.calendar-event.done {
  background: #eceee9;
  color: var(--done);
  text-decoration: line-through;
}

.calendar-event.range {
  position: relative;
  min-height: 24px;
  margin-inline: -4px;
  border-radius: 0;
  background: #dbeee8;
  color: #174f43;
  cursor: grab;
}

.calendar-event .range-grip {
  display: block;
  width: 5px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(23, 79, 67, 0.34);
  cursor: ew-resize;
}

.calendar-event .range-grip-start {
  margin-right: 2px;
}

.calendar-event .range-grip-end {
  margin-left: auto;
}

.calendar-event.range:hover {
  background: #cce7df;
}

.calendar-event.range:active,
.calendar-event.dragging {
  cursor: grabbing;
  opacity: 0.72;
}

.calendar-event.range-start {
  margin-left: 0;
  border-radius: 999px 0 0 999px;
  padding-left: 8px;
}

.calendar-event.range-end {
  margin-right: 0;
  border-radius: 0 999px 999px 0;
  padding-right: 8px;
}

.calendar-event.range-start.range-end {
  border-radius: 999px;
}

.calendar-event.range:not(.range-start)::before {
  content: "";
  width: 6px;
}

.calendar-event.range.done {
  background: #e0e4df;
  color: var(--done);
}

.calendar-items time {
  flex: 0 0 auto;
  font-weight: 800;
}

.calendar-items span {
  overflow: hidden;
  color: inherit;
  font-weight: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 35, 31, 0.22);
}

.dialog {
  width: min(540px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.dialog-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  background: rgba(244, 221, 213, 0.42);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.inline-add .form-error {
  grid-column: 1 / -1;
}

.dialog-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-form input,
.dialog-form textarea {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0 12px;
}

.dialog-form textarea {
  min-height: 104px;
  padding: 10px 12px;
  resize: vertical;
}

.title-field input {
  min-height: 56px;
  font-size: 24px;
  font-weight: 800;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row > label:only-child {
  grid-column: 1 / -1;
}

.reminder-row {
  grid-template-columns: minmax(132px, 0.55fr) minmax(220px, 1fr);
  align-items: end;
}

.checkbox-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  align-self: end;
  gap: 10px;
  min-height: 42px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand) !important;
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.detail-meta {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.detail-meta span {
  color: var(--muted);
  font-size: 13px;
}

.detail-meta strong {
  color: var(--ink);
  font-size: 14px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ghost-button.danger {
  color: var(--accent);
}

.settings-view {
  display: grid;
  gap: 16px;
}

.settings-card,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.settings-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.settings-card h3 {
  margin: 4px 0 6px;
  font-size: 20px;
}

.settings-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.settings-form {
  display: grid;
  gap: 12px;
}

.settings-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.settings-form input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0 12px;
}

.account-panel {
  display: grid;
  gap: 14px;
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.account-summary > div {
  min-width: 0;
}

.account-summary strong,
.account-summary span {
  display: block;
}

.account-summary strong {
  color: var(--ink);
}

.account-summary span {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-actions.vertical {
  display: grid;
  align-items: stretch;
}

.empty-state.compact {
  padding: 16px;
  text-align: left;
}

.backup-list,
.history-list {
  display: grid;
  width: 100%;
  gap: 8px;
}

.backup-row,
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.backup-row div,
.history-row div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.backup-row strong,
.history-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-row span,
.history-row em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row {
  justify-content: flex-start;
}

.history-row > span {
  flex: 0 0 auto;
  min-width: 72px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.settings-error {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.diagnostics-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.diagnostics-grid dl {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.diagnostics-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.diagnostics-grid dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conflict-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.conflict-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  background: rgba(244, 221, 213, 0.28);
}

.conflict-head strong,
.conflict-head span {
  display: block;
}

.conflict-head strong {
  font-size: 16px;
}

.conflict-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.conflict-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.conflict-compare > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.conflict-side {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.conflict-field {
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid rgba(222, 216, 204, 0.72);
}

.conflict-field dt {
  color: var(--muted);
  font-size: 12px;
}

.conflict-field dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.conflict-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.file-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  font-weight: 700;
  padding: 0 12px;
}

.file-button input {
  display: none;
}

.notice {
  padding: 12px 14px;
  color: var(--brand);
  font-weight: 700;
}

.add-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.64);
  color: var(--muted);
  text-align: left;
}

.add-row:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.add-row span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-weight: 800;
}

.add-row strong,
.add-row em {
  display: block;
  min-width: 0;
}

.add-row strong {
  color: var(--ink);
}

.add-row em {
  grid-column: 2;
  overflow: hidden;
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-add {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 132px auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 22px rgba(44, 39, 31, 0.06);
}

.inline-add input {
  width: 100%;
  padding: 0 12px;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: 1fr 1fr;
  }

  .main {
    padding: 20px 16px;
  }

  .topbar {
    justify-content: stretch;
  }

  .view-switch {
    width: 100%;
  }

  .view-switch {
    grid-template-columns: repeat(3, 1fr);
  }

  .item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .ghost-button {
    grid-column: 2;
    justify-self: start;
    padding-left: 0;
  }
  .list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented.compact {
    width: 100%;
  }

  .inline-add {
    grid-template-columns: 1fr;
  }

  .settings-card {
    grid-template-columns: 1fr;
  }

  .conflict-compare {
    grid-template-columns: 1fr;
  }

  .conflict-actions {
    justify-content: stretch;
  }

  .conflict-actions button {
    flex: 1;
  }

  .week-grid {
    grid-template-columns: repeat(7, minmax(138px, 1fr));
  }

  .month-grid {
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  .segmented {
    grid-template-columns: 1fr;
  }

  .item-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .item-title-row strong {
    white-space: normal;
  }
}
