/* ==================================================
   OPEN STORIES INDEX (/open-stories/)
   Loaded only on that page, after light-shell.css and
   books-catalog.css (see includes/head.php). Hero, guide
   and section heads reuse the cat-* rules; the story list
   uses its own os-* classes.
================================================== */

body.light-shell .open-catalog {
  max-width: 960px;
}

/* ---------- Filter ---------- */

body.light-shell .os-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 12px;
}

body.light-shell .os-filter input {
  flex: 1 1 280px;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid var(--ls-field-border);
  border-radius: 3px;
  background: var(--ls-field-bg);
  color: var(--ls-ink);
  font: inherit;
  font-size: 0.98rem;
}

body.light-shell .os-filter input:focus {
  outline: 2px solid var(--ls-accent);
  outline-offset: 1px;
}

body.light-shell .os-filter-status {
  margin: 0;
  color: var(--ls-muted);
  font-family: var(--cat-sans);
  font-size: 0.82rem;
}

/* ---------- Story list ---------- */

body.light-shell .os-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
}

body.light-shell .os-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--ls-hairline);
}

body.light-shell .os-row[hidden] {
  display: none;
}

body.light-shell .os-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: var(--ls-paper-card);
  box-shadow: 0 1px 2px rgba(43,33,24,0.18), 0 8px 18px rgba(43,33,24,0.16);
  transition: transform .2s ease, box-shadow .2s ease;
}

body.light-shell .os-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.light-shell .os-row:hover .os-cover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(43,33,24,0.18), 0 14px 26px rgba(43,33,24,0.22);
}

body.light-shell .os-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  line-height: 1.3;
}

body.light-shell .os-title a {
  color: var(--ls-ink);
  text-decoration: none;
}

body.light-shell .os-row:hover .os-title a,
body.light-shell .os-title a:focus-visible {
  color: var(--ls-link);
}

body.light-shell .os-meta {
  margin: 0 0 8px;
  color: var(--ls-muted);
  font-family: var(--cat-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.light-shell .os-desc {
  margin: 0;
  color: var(--ls-ink-soft);
  font-size: 0.93rem;
  line-height: 1.6;
}

body.light-shell .os-fresh {
  color: var(--ls-accent-deep);
}

body.light-shell .os-recent .os-list {
  margin-bottom: 8px;
}

body.light-shell .os-variant {
  margin: 8px 0 0;
  font-family: var(--cat-sans);
  font-size: 0.82rem;
}

body.light-shell .os-variant a {
  color: var(--ls-link);
}

body.light-shell .os-empty {
  margin: 32px 0 0;
  color: var(--ls-muted);
  font-style: italic;
  text-align: center;
}

body.light-shell .os-note {
  margin: 0 auto 40px;
  color: var(--ls-muted);
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.7;
  text-align: center;
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  body.light-shell .os-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body.light-shell .os-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.light-shell .os-cover {
    transition: none;
  }
  body.light-shell .os-row:hover .os-cover {
    transform: none;
  }
}
