/* StoryCover — text-only window cover (see /story-cover.js).
   Sized by its .book-object parent: set --cover-h (default 200px); the
   width follows the 3:4 portrait ratio and all type scales with it (cqw). */
.book-object {
  position: relative;
  height: var(--cover-h, 200px);
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.book-spine {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 6px;
  border-radius: 3px 0 0 3px;
  z-index: 2;
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.15);
}
.story-cover {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  container-type: inline-size;
  border-radius: 0 6px 6px 0;
  box-shadow: 4px 4px 14px -2px rgba(31,25,18,0.18),
              1px 1px 3px rgba(31,25,18,0.08);
  /* Faint cloth weave: two hairline grids at ~5% ink, flat colour only. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Cpath d='M0 .5h4M.5 0v4' stroke='%231f1912' stroke-opacity='.035' stroke-width='1' fill='none'/%3E%3C/svg%3E");
}
.sc-inner {
  height: 100%;
  padding: 9cqw 9cqw 8cqw 12cqw;   /* extra left room for the spine */
  display: flex; flex-direction: column; align-items: center;
}
.sc-motif { width: 11cqw; height: 11cqw; flex: none; }
.sc-window {
  width: 50cqw; height: 65cqw; flex: none;
  margin-top: 6cqw;
  overflow: visible;
}
.sc-title {
  flex: 1 1 0; min-height: 0; width: 100%;
  margin-top: 6cqw;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.sc-title span {
  display: block; width: 100%;
  font-family: var(--font-display); font-weight: 700;
  font-size: 10.5cqw; line-height: 1.12;
  overflow-wrap: normal; word-break: normal; hyphens: none;
  text-wrap: balance;
}
@media (prefers-reduced-motion: reduce) {
  .book-object { transition: none; }
}
