/* THE LIBRARY'S TWO NEW FILTERS (Alison, 2026-12-04: "build both ideas"). Photos waiting (N) / Shared / Not shared
   yet, beside Most recent / By Key Move. Logic: static/js/screens/library/waiting-and-shared.js.
   Easy on the eyes: the row keeps the existing pill toggle; every action inside is quiet sage text, no outlined pill,
   no underline. Dark mode under :root[data-theme="dark"]. */
:root {
  --lf-sage: #4A7C59;
  --lf-quiet: #6B7A6E;
  --lf-ink: #2F3A33;
  --lf-tile: #FFFFFF;
  --lf-line: rgba(74, 124, 89, 0.18);
}
:root[data-theme="dark"] {
  --lf-sage: #A9C8A6;
  --lf-quiet: #A9B6AC;
  --lf-ink: #E8E4DC;
  --lf-tile: #1F272F;
  --lf-line: rgba(169, 200, 166, 0.18);
}

/* Five choices in one row. On a phone the row scrolls sideways inside itself, never off the page. */
/* The bar is a flex item of the header: without min-width:0 it grows to its widest child and runs off a phone. */
#screen-stories .filter-bar { min-width: 0; max-width: 100%; }
#stories-sort-toggle {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#stories-sort-toggle::-webkit-scrollbar { display: none; }
#stories-sort-toggle .stories-sort-btn { flex: none; white-space: nowrap; }
#stories-sort-toggle .stories-sort-btn[hidden] { display: none; }

.lf-quiet, .lf-intro {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: var(--lf-quiet);
  margin: 1.25rem 0 0.5rem;
}
.lf-none { text-align: center; padding: 2.5rem 1rem; font-style: italic; }

/* Quiet sage words that act. */
.lf-link, .lf-share-btn {
  font: 600 0.78rem/1.3 'Montserrat', sans-serif;
  color: var(--lf-sage);
  background: none;
  border: 0;
  padding: 0.25rem 0;
  cursor: pointer;
  text-decoration: none;
}
.lf-link:hover, .lf-share-btn:hover, .lf-link:focus-visible, .lf-share-btn:focus-visible {
  text-decoration: none;
  opacity: 0.8;
}
.lf-quiet-btn { color: var(--lf-quiet); font-weight: 500; }

.lf-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 0.75rem 0 1.5rem;
}
.lf-photo {
  background: var(--lf-tile);
  border: 1px solid var(--lf-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lf-photo-img { aspect-ratio: 1 / 1; background: var(--lf-line); }
.lf-photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lf-photo-meta {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.55rem 0.7rem 0;
  font: 500 0.72rem/1.35 'Montserrat', sans-serif;
  color: var(--lf-quiet);
  min-width: 0;
}
.lf-photo-space { color: var(--lf-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-photo-acts {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0.7rem 0.55rem;
}
.lf-more-wrap { text-align: center; margin: 0 0 2rem; }
.lf-aside {
  font: 500 0.82rem/1.4 'Montserrat', sans-serif;
  color: var(--lf-quiet);
  margin: 1rem 0 0;
}

.lf-share-line { margin-top: 0.45rem; }
.lf-share-note { font: 600 0.72rem/1.3 'Montserrat', sans-serif; color: var(--lf-quiet); }

@media (max-width: 600px) {
  /* On a phone the five wrap neatly onto two lines, so every choice is in sight without scrolling. */
  #stories-sort-toggle { flex-wrap: wrap; overflow-x: visible; border-radius: 18px; row-gap: 2px; }
  #stories-sort-toggle .stories-sort-btn { padding: 0.4rem 0.75rem; }
  .lf-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .lf-photo-meta { flex-direction: column; align-items: flex-start; gap: 0; }
  .lf-photo-meta .lf-dot { display: none; }
  .lf-photo-space { max-width: 100%; }
  .lf-photo-acts { flex-direction: column; gap: 0; align-items: flex-start; }
}
