nav .brand { text-decoration: none; }
form.inline { display: inline; margin: 0; }
button.link {
  background: none; border: none; padding: 0; margin: 0; width: auto;
  color: var(--pico-primary); cursor: pointer; font-size: inherit;
}
.flash { padding: .75rem 1rem; border-radius: var(--pico-border-radius); background: var(--pico-card-background-color); border-left: 4px solid var(--pico-primary); }
.flash-error { border-left-color: var(--pico-del-color); }
.view-as-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; padding: .6rem 1rem; border: 2px dashed var(--pico-primary); border-radius: var(--pico-border-radius); background: var(--pico-card-background-color); font-weight: 700; }
.view-as-banner button { margin: 0; padding: .35rem 1rem; width: auto; }
.flash-success { border-left-color: var(--pico-ins-color); }

.chore-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.chore { margin: 0; display: flex; flex-direction: column; }
.chore header { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.chore h3 { margin: 0; font-size: 1.1rem; }
.chore .meta { font-size: .875rem; color: var(--pico-muted-color); margin: .25rem 0 0; }
.chore img.thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--pico-border-radius); margin-top: .75rem; }
.chore footer { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; }
.chore footer form { margin: 0; }
.chore footer button { width: 100%; margin: 0; }
.overdue { color: var(--pico-del-color); font-weight: 600; }
.empty { color: var(--pico-muted-color); font-style: italic; }
.summary { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar-sm { width: 1.5rem; height: 1.5rem; }
.owner { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions form { margin: 0; }
.actions button, .actions [role=button] { margin: 0; width: auto; }
td .actions button { padding: .4rem .8rem; }
.table-wrap { overflow-x: auto; }
code.invite { word-break: break-all; }
.chore footer a[role="button"] { display: block; width: 100%; margin: 0; }
.gallery { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-bottom: 1rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--pico-border-radius); display: block; }
.gallery-small { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); max-width: 260px; margin: .5rem 0 0; }
.photo-choice span { display: block; font-size: .875rem; margin-top: .25rem; }

/* Let the nav wrap instead of widening the page on phones. */
header nav, header nav ul { flex-wrap: wrap; }
header nav ul li { padding-top: .25rem; padding-bottom: .25rem; }

/* On narrow screens, show each table row as a stacked card. */
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; padding: .75rem 0; border-bottom: 1px solid var(--pico-table-border-color); }
  table.stack td { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; border: none; text-align: right; }
  table.stack td::before { content: attr(data-label); font-weight: 600; color: var(--pico-muted-color); text-align: left; }
  table.stack td[data-label=""] { display: block; text-align: left; }
  table.stack td[data-label=""]::before { content: none; }
  table.stack td .actions { margin-top: .5rem; }
}
.weekdays { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.weekdays label { margin: 0; white-space: nowrap; }
.actions a[role="button"] { margin: 0; }

/* Photo drop areas (see photo-drop.js) */
.dropzone {
  border: 2px dashed var(--pico-muted-border-color); border-radius: var(--pico-border-radius);
  padding: 1rem; margin-bottom: .5rem; transition: border-color .15s, background-color .15s;
}
.dropzone.dragging { border-color: var(--pico-primary); background: var(--pico-primary-focus); }
.dropzone input[type=file] { margin-bottom: 0; }
.dropzone-hint { margin: 0 0 .5rem; color: var(--pico-muted-color); }
.dropzone-status { margin: .5rem 0 0; color: var(--pico-del-color); font-size: .875rem; }
.dropzone-status:empty { display: none; }
.dropzone-previews { margin: .75rem 0 0; }
.dropzone-previews:empty { display: none; }
.dropzone-item { position: relative; margin: 0; }
.dropzone-remove {
  position: absolute; top: .25rem; right: .25rem; width: 1.75rem; height: 1.75rem; padding: 0; margin: 0;
  border-radius: 50%; line-height: 1; font-size: 1.1rem; background: rgba(0, 0, 0, .65); border: none; color: #fff;
}

/* Title banner on the chores page */
.banner {
  display: grid; gap: 0 1.5rem; align-items: center; margin-bottom: 2rem;
  grid-template-columns: minmax(0, 1fr);
}
.banner figure { margin: 0; }
.banner img { width: 100%; height: auto; display: block; border-radius: var(--pico-border-radius); }
.banner-text h1 { margin: 1rem 0 .25rem; font-size: 2.25rem; }

@media (min-width: 768px) {
  .banner { grid-template-columns: minmax(0, 420px) 1fr; }
  .banner-text h1 { margin-top: 0; font-size: 3rem; }
}
.site-footer { padding-top: 2rem; padding-bottom: 2rem; color: var(--pico-muted-color); text-align: center; }
