/* Story reading pages: breadcrumbs, the quest-page banner, the chapter reader's header and
   navigation, and the quest status chips. Layered on story.css (dialogue / quest-page
   styles). The board layout of the hubs, the stories library and the story page itself is
   static/css/board-pages/play.css. */

.quest-page-banner img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin-bottom: 1rem;
}

.quest-page .quest-blurb {
  text-align: center;
  margin: .5rem 0;
}

/* ---- Breadcrumbs (story, chapter and hub pages) ---- */
.breadcrumbs li { min-width: 0; overflow-wrap: anywhere; }
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .85rem;
  color: var(--ink-soft);
}

.breadcrumbs li + li::before {
  content: "›";
  margin-right: .25rem;
  color: var(--ink-faint);
}

.breadcrumbs span[aria-current] {
  color: var(--ink);
  font-weight: 700;
}

/* Pinned straight to the board, a breadcrumb is cream on its dark-wood label (board.css). */
.corkboard > .breadcrumbs { margin: 0 0 18px; }
.corkboard > .breadcrumbs :is(ol, li::before, span[aria-current]) { color: inherit; }

/* Status chip on a collapsed quest row. Text stays --ink on the card colour in both
   themes; the coloured dot and border carry the state, never colour alone. */
.quest-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .15rem .6rem;
  border: 1.5px solid var(--chip, var(--ink-faint));
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.quest-chip::before {
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--chip, var(--ink-faint));
}

:root {
  --chip-open: #3f7a4b;
  --chip-soon: #b7791f;
  --chip-pending: #7a5ab0;
  --chip-done: var(--accent-dark);
  --chip-closed: var(--ink-soft);
}

:root[data-theme="dark"] {
  --chip-open: #7fd3a3;
  --chip-soon: #f0c869;
  --chip-pending: #b9a3f5;
  --chip-done: var(--accent);
  --chip-closed: var(--ink-faint);
}

.quest-chip--open { --chip: var(--chip-open); }
.quest-chip--soon { --chip: var(--chip-soon); }
.quest-chip--pending { --chip: var(--chip-pending); }
.quest-chip--done { --chip: var(--chip-done); }
.quest-chip--closed { --chip: var(--chip-closed); }

/* Chapter page header + previous / contents links. */
.quest-page .quest-title a {
  color: inherit;
  text-decoration: none;
}

.quest-page .quest-title a:hover {
  text-decoration: underline;
}

.story-chapter-title {
  margin: .25rem 0;
}

.story-chapter-nav {
  display: flex;
  gap: .25rem 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: .5rem 0;
}

/* Each chapter link is a 44px tap target. */
.story-chapter-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* The story title on a chapter page links back to the story: a 44px target. */
.quest-page .quest-title a {
  display: inline-block;
  min-height: 44px;
  max-width: 100%;
}
