@import url("/css/tokens.css");
@import url("/css/components.css");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Legacy aliases → shelf tokens (migrate components to --shelf-* over time) */
  --color-bg: var(--shelf-color-bg);
  --color-surface: var(--shelf-color-surface);
  --color-surface-hover: var(--shelf-color-surface-hover);
  --color-surface-elevated: var(--shelf-color-surface-elevated);
  --color-text: var(--shelf-color-text);
  --color-text-muted: var(--shelf-color-text-muted);
  --color-text-subtle: var(--shelf-color-text-subtle);
  --color-border: var(--shelf-color-border);
  --color-border-strong: var(--shelf-color-border-strong);
  --color-accent: var(--shelf-color-accent);
  --color-accent-soft: var(--shelf-color-accent-soft);
  --color-accent-hover: var(--shelf-color-accent-hover);
  --color-error-bg: var(--shelf-color-error-bg);
  --color-error-border: var(--shelf-color-error-border);
  --color-error-text: var(--shelf-color-error-text);
  --color-libby: var(--shelf-color-libby);
  --color-libby-soft: var(--shelf-color-libby-soft);
  --color-star: var(--shelf-color-star);
  --color-ink: var(--shelf-color-ink);
  --color-paper: var(--shelf-color-paper-100);
  --color-stamp: var(--shelf-color-stamp-ink);
  --color-shelf-paper: var(--shelf-color-paper-300);
  --color-shelf-warm: var(--shelf-color-surface-shelf);
  --color-shelf-ink: var(--shelf-color-ink-muted);
  --color-trending: var(--shelf-color-accent);
  --color-popular: var(--shelf-color-teal);
  --font-ui: var(--shelf-font-ui);
  --font-register: var(--shelf-font-data);
  --font-catalog: var(--shelf-font-data);
  --font-stamp: var(--shelf-font-stamp);
  --font-sans: var(--shelf-font-ui);
  --font-display: var(--shelf-font-display);
  --radius-sm: var(--shelf-radius-sm);
  --radius-md: var(--shelf-radius-md);
  --radius-lg: var(--shelf-radius-lg);
  --radius-xl: var(--shelf-radius-lg);
  --radius-pill: var(--shelf-radius-pill);
  --cover-shadow: var(--shelf-shadow-cover);
  --grid-gap: var(--shelf-grid-gap);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .press-marquee__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }

  .press-marquee__group[aria-hidden="true"] {
    display: none;
  }

  .press-marquee {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

body {
  font-family: var(--shelf-font-ui);
  font-size: var(--shelf-text-base);
  background: var(--shelf-color-bg);
  color: var(--shelf-color-text);
  line-height: var(--shelf-leading-normal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Display — IBM Plex Mono (titles). Stamp reserved for brand + stamps only. */
h1,
h2,
h3,
.hero__title,
.landing-block__intro h2,
.dash-header h1,
.dash-section__copy h2,
.page-header h1,
.section__header h2,
.onboarding-step h2,
.reading-now-hero h2,
.book-hero h1,
.review-snippet__book,
.popular-shelf__title,
.reader-shelf__name,
.community-scale__value,
.press-marquee__quote p,
.book-posted-success__title,
.value-prop h3,
.rate-queue__header h2,
.return-prompt__meta h3,
.list-case__title {
  font-family: var(--shelf-font-display);
  font-weight: var(--shelf-weight-semibold);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--shelf-tracking-tight);
  text-transform: none;
}

.hero__title {
  font-weight: var(--shelf-weight-bold);
}

.landing-block__intro h2 {
  font-weight: var(--shelf-weight-semibold);
}

/* Catalog register — metadata, dates, queue position */
.lib-register,
.lib-card__catalog,
.hold-row__slot-index,
.hold-row__position,
.hold-row__libby-row,
.cover-strip__label,
.book-hero__meta-detail,
.status-badge {
  font-family: var(--font-register);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.lib-card__catalog,
.hold-row__slot-index,
.cover-strip__label {
  text-transform: uppercase;
  font-size: 0.6875rem;
  font-weight: 400;
}

a {
  color: var(--color-accent);
}

.main {
  width: 100%;
  max-width: var(--shelf-content-max);
  margin: 0 auto;
  padding: var(--shelf-space-page-y) var(--shelf-space-page-x) var(--shelf-space-12);
  overflow-x: auto;
}

.main--landing,
.main--feed,
.main--survey {
  max-width: none;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: var(--shelf-text-2xl);
  font-weight: var(--shelf-weight-bold);
  margin-bottom: var(--shelf-space-1);
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  max-width: 560px;
}

.page-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section {
  background: var(--shelf-color-surface);
  border: var(--shelf-border-paper);
  border-radius: var(--shelf-radius-sm);
  box-shadow: var(--shelf-shadow-paper-rest);
  padding: var(--shelf-space-card-padding);
}

.section__header {
  margin-bottom: 1.5rem;
}

.section__header h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  letter-spacing: -0.02em;
}

.section__header p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.section__footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* Book covers */
.book-cover-wrap {
  position: relative;
  width: 4.5rem;
  aspect-ratio: 2 / 3;
  background: var(--cover-fallback, var(--color-surface-elevated));
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.book-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover--missing {
  opacity: 0;
}

.book-cover-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.book-cover--lg .book-cover-wrap,
.book-cover-wrap.book-cover-wrap--lg {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  box-shadow: var(--cover-shadow);
}

.book-cover--md .book-cover-wrap,
.book-cover-wrap.book-cover-wrap--md {
  width: 72px;
  height: 108px;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
}

.book-cover--sm .book-cover-wrap,
.book-cover-wrap.book-cover-wrap--sm {
  width: 48px;
  height: 72px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.book-cover-wrap.book-cover-wrap--md {
  width: 72px;
  height: 108px;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
}

.book-cover-wrap.book-cover-wrap--hold-opt {
  width: 112px;
  height: 168px;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
  flex-shrink: 0;
}

.cover-stack {
  display: flex;
  margin-bottom: 1rem;
}

.cover-stack .book-cover-wrap {
  width: 44px;
  height: 66px;
  margin-left: -12px;
  border-radius: 6px;
  box-shadow: var(--cover-shadow);
  border: 2px solid var(--color-surface);
}

.cover-stack .book-cover-wrap:first-child {
  margin-left: 0;
}

/* Buttons — see components.css (.shelf-btn / .btn) */

.suggestion-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.suggestion-card__actions .btn {
  width: 100%;
  min-width: 0;
}

.readnow-tile .btn,
.readnow-featured .btn {
  width: 100%;
  min-width: 0;
}

.flow-action-bar .btn {
  flex-shrink: 0;
  min-width: 10.5rem;
}

.profile-card__actions .btn {
  min-width: 9rem;
}

/* Value props */
.value-props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.value-prop {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--color-accent);
}

.value-prop__icon {
  font-size: 1.75rem;
  margin-bottom: 0.875rem;
  line-height: 1;
}

.value-prop h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.value-prop p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* Press marquee */
.landing-block__intro--center {
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.landing-block--press {
  padding-bottom: 0.5rem;
}

.press-marquee {
  position: relative;
  overflow: hidden;
  margin: 0 calc(-1 * clamp(1.25rem, 4vw, 3rem));
  padding: 1.5rem 0 2rem;
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}

.press-marquee__track {
  display: flex;
  width: max-content;
  animation: pressMarqueeScroll 55s linear infinite;
  will-change: transform;
}

.press-marquee__group {
  display: flex;
  align-items: stretch;
  gap: 2.5rem;
  padding-right: 2.5rem;
}

.press-marquee__slide {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  width: min(280px, 72vw);
  margin: 0;
  padding: 1.25rem 1.5rem 1.375rem;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
  transform-origin: center center;
}

.press-marquee__slide:hover {
  transform: scale(1.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 14px 32px rgba(28, 24, 22, 0.14);
  z-index: 3;
  position: relative;
}

.press-marquee__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  height: 64px;
  width: 100%;
}

.press-marquee__logo img {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(196px, 100%);
  object-fit: contain;
  object-position: center;
}

.press-marquee__quote {
  text-align: center;
  margin: 0;
}

.press-marquee__quote p {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.press-marquee__quote footer {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.press-marquee__quote cite {
  font-style: normal;
  color: var(--color-text-muted);
}

@keyframes pressMarqueeScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Community scale */
.landing-block--scale {
  border-top: 1px solid var(--color-border);
  padding-top: var(--grid-gap);
}

.community-scale {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.community-scale__card {
  text-align: center;
  padding: 2rem 1.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.community-scale__value {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6vw, 4rem);
  font-weight: var(--shelf-weight-bold);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-accent);
}

.community-scale__label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.community-scale__detail {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 16rem;
  margin-top: 0.375rem;
}

/* Publisher / library cards */
.publisher-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* Cards & stamps — see components.css */

.community-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: left;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.community-stats--strip {
  gap: clamp(1.5rem, 4vw, 3rem);
}

.stat-block {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  text-align: left;
}

.stat-block--minimal .stat-block__value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--color-text);
}

.stat-block__value {
  display: block;
  font-size: 1.75rem;
  font-weight: var(--shelf-weight-bold);
  color: var(--color-accent);
  letter-spacing: -0.03em;
}

.stat-block__label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Review snippets */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-list__empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
}

#sectionNeverEnoughBooks.reveal--visible .review-snippet,
#sectionNeverEnoughBooks .review-snippet {
  opacity: 1;
  transform: none;
}

.community-reviews-preview {
  position: relative;
  padding: 1.25rem 1.375rem 1.5rem;
  background: var(--color-paper);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(28, 24, 22, 0.06);
}

.community-reviews-preview__badge {
  display: inline-block;
  margin-bottom: 1rem;
}

.community-reviews-preview__list {
  margin-bottom: 0;
}

.community-reviews-preview__cta {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.community-reviews-preview__copy {
  max-width: 36rem;
  margin: 0 auto 1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.review-snippet.review-snippet {
  padding: 1.5rem 1.75rem;
}

.review-snippet__inner {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.review-snippet__cover,
.review-snippet__inner .review-snippet__cover {
  width: 100px;
  height: 150px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
}

.review-snippet__content {
  flex: 1;
  min-width: 0;
}

.review-snippet__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.review-snippet__book {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.review-snippet__text {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 0.625rem;
  line-height: 1.6;
}

.review-snippet .stars {
  color: var(--color-star);
  letter-spacing: 0.05em;
  font-size: 0.9375rem;
}

.review-snippet__cover-link {
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.review-snippet__book--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: color 0.15s;
}

.review-snippet__book--link:hover {
  color: var(--color-accent);
}

.review-snippet__imprint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: -0.25rem 0 0.5rem;
  line-height: 1.4;
}

.review-snippet__imprint .text-link--author {
  font-size: 0.8125rem;
}

.review-snippet__engagement {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--color-border);
}

.engagement-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  font-size: 0.8125rem;
  line-height: 1;
  cursor: default;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.12s;
}

button.engagement-pill {
  margin: 0;
  font: inherit;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

button.engagement-pill--likes:active {
  transform: scale(0.96);
}

.engagement-pill--liked {
  background: rgba(194, 59, 51, 0.1);
  border-color: rgba(194, 59, 51, 0.32);
}

.engagement-pill--liked .engagement-pill__count {
  color: var(--color-accent);
}

.engagement-pill--pop {
  animation: engagement-like-pop 0.22s ease;
}

@keyframes engagement-like-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.engagement-pill__icon {
  font-size: 1.0625rem;
  line-height: 1;
}

.engagement-pill__count {
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.engagement-pill__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.engagement-pill--likes:hover {
  background: rgba(194, 59, 51, 0.08);
  border-color: rgba(194, 59, 51, 0.22);
}

.engagement-pill--comments:hover {
  background: rgba(61, 107, 90, 0.08);
  border-color: rgba(61, 107, 90, 0.22);
}

.stars {
  color: var(--color-star);
  letter-spacing: 0.05em;
  font-size: 0.8125rem;
}

/* Landing CTA handled by .landing-block--cta */

/* Profile */
.profile-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.profile-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-card__info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.profile-card__meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.profile-card__stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.profile-stat__value {
  font-weight: var(--shelf-weight-bold);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.profile-stat__label {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-card__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.alert {
  padding: 1rem 1.125rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.alert--info {
  background: var(--color-libby-soft);
  border: 1px solid rgba(0, 200, 150, 0.2);
  color: var(--color-text);
}

.alert--warning {
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.2);
  color: var(--color-text);
}

.alert a {
  color: var(--color-accent);
  font-weight: 600;
}

/* Holds */
.holds-summary {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.holds-badge {
  padding: 0.5rem 1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.holds-badge strong {
  color: var(--color-accent);
}

.holds-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.hold-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.hold-row__info {
  flex: 1;
  min-width: 0;
}

.hold-row__title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.hold-row__author {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.hold-row__meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.priority-pill {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.priority-pill--high {
  background: var(--color-libby-soft);
  color: var(--color-libby);
}

.priority-pill--medium {
  background: rgba(245, 197, 24, 0.12);
  color: var(--color-star);
}

.priority-pill--low {
  background: var(--color-surface-hover);
  color: var(--color-text-subtle);
}

.optimization-tip {
  margin-top: 1rem;
  padding: 1rem 1.125rem;
  background: var(--color-libby-soft);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border: 1px solid rgba(0, 200, 150, 0.15);
  line-height: 1.55;
}

.optimization-tip--banner {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

/* Read now cards */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.book-card {
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--color-border);
  transition: background 0.15s;
}

.book-card:hover {
  background: var(--color-surface-hover);
}

.book-card .book-cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
}

.book-card__tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.book-card__format {
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.book-card__title {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.book-card__author {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.625rem;
}

.book-card__reason {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  margin-bottom: 0.875rem;
  line-height: 1.5;
}

/* Reading stats */
.stats-highlight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.stat-card--green {
  background: #122620;
}

.stat-card--purple {
  background: #1a1524;
}

.stat-card--orange {
  background: #241810;
}

.stat-card--blue {
  background: #101820;
}

.stat-card--teal {
  background: #0f2420;
}

.stat-card__label {
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card__value {
  font-size: 1.125rem;
  font-weight: var(--shelf-weight-bold);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.stat-card--orange .book-cover-wrap {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 72px;
  opacity: 0.85;
}

/* Rate cards */
.subsection {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.subsection__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.subsection__header h3 {
  font-size: 1.0625rem;
  font-weight: 700;
}

.rate-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.rate-card {
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  padding: 0.875rem;
  border: 1px solid var(--color-border);
  text-align: center;
  transition: background 0.15s;
}

.rate-card:hover {
  background: var(--color-surface-hover);
}

.rate-card .book-cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  margin: 0 auto 0.75rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
}

.rate-card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.rate-card__author {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.rate-card__stars {
  font-size: 0.9375rem;
  cursor: pointer;
  color: var(--color-star);
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  color: var(--color-star);
  padding: 0 0.125rem;
}

/* Social feed */
.feed-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.main--feed {
  max-width: 920px;
  margin: 0 auto;
}

.page-sections--feed {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.page-sections--feed .landing-block {
  margin: 0;
}

.page-sections--feed .landing-block__intro {
  margin-bottom: 1.25rem;
}

.page-sections--feed .review-list {
  gap: 1rem;
}

.feed-snippet--own .lib-card__catalog {
  color: var(--color-text);
}

.feed-snippet__you {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-accent);
}

.feed-snippet--highlight {
  border-color: var(--color-accent);
  box-shadow:
    inset 0 0 0 1px rgba(194, 59, 51, 0.2),
    0 12px 32px rgba(28, 24, 22, 0.1);
  animation: feedHighlightPulse 1.4s ease;
}

.feed-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.feed-categories__link {
  display: inline-flex;
  align-items: center;
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-elevated);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.feed-categories__link:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.feed-category {
  scroll-margin-top: 1.5rem;
}

.feed-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  background: var(--color-surface-elevated);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
}

.feed-empty a {
  color: var(--color-accent);
  font-weight: 600;
}

.feed-item__cover {
  text-decoration: none;
  flex-shrink: 0;
}

.poster-row__meta {
  display: block;
  font-size: 0.625rem;
  color: var(--color-text-subtle);
  margin-top: 0.25rem;
}

.feed-posted-banner a {
  color: var(--color-accent);
  font-weight: 600;
}

/* Feed tabs — see components.css */

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-posted-banner {
  padding: 1rem 1.125rem;
  margin-bottom: 1rem;
  background: var(--color-libby-soft);
  border: 1px solid rgba(0, 200, 150, 0.25);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.feed-posted-banner strong {
  color: var(--color-libby);
}

@keyframes feedHighlightPulse {
  0%,
  100% {
    transform: translateY(0);
  }

  35% {
    transform: translateY(-2px);
  }
}

.rate-empty {
  padding: 2rem;
  text-align: center;
  background: var(--color-surface-elevated);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
}

.rate-empty p {
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.rate-empty .btn {
  margin-top: 0.5rem;
}

.feed-snippet .stars {
  display: block;
  margin-top: 0.375rem;
}

/* Popular books shelf layout */
.popular-shelf {
  width: 100%;
  padding-bottom: 0.25rem;
}

.popular-shelf__ledge {
  position: relative;
  padding: 0 clamp(0.75rem, 2.5vw, 1.75rem);
  background: linear-gradient(180deg, var(--color-shelf-warm) 0%, #a89572 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  box-shadow: 0 6px 16px rgba(28, 24, 22, 0.12);
}

.popular-shelf__ledge::after {
  content: "";
  display: block;
  height: clamp(8px, 1.2vw, 12px);
  margin: 0 calc(-1 * clamp(0.75rem, 2.5vw, 1.75rem));
  background: linear-gradient(180deg, #a89572 0%, #8f7d5e 100%);
}

.popular-shelf__grid {
  --shelf-slot-count: 6;
  --shelf-gap: clamp(0.5rem, 1.5vw, 1.25rem);
  display: grid;
  grid-template-columns: repeat(var(--shelf-slot-count), minmax(0, 1fr));
  gap: var(--shelf-gap);
  align-items: start;
  width: 100%;
  padding: clamp(1rem, 2.5vw, 1.75rem) clamp(0, 0.5vw, 0.25rem) clamp(0.75rem, 1.5vw, 1rem);
  box-sizing: border-box;
}
.popular-shelf__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 0;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.popular-shelf__item:focus-visible .popular-shelf__cover-wrap {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.popular-shelf__cover-wrap {
  width: 100%;
  min-height: clamp(132px, 20vw, 196px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 0.5rem;
  position: relative;
  transform: translateY(calc(-1 * var(--lift, 0px))) rotate(var(--tilt, 0deg));
  transform-origin: bottom center;
  transition: transform 0.2s ease;
}

.popular-shelf__item:hover .popular-shelf__cover-wrap {
  animation: shelfBookWiggle 0.5s ease;
  z-index: 2;
}

@keyframes shelfBookWiggle {
  0%,
  100% {
    transform: translateY(calc(-6px - var(--lift, 0px))) rotate(0deg);
  }

  25% {
    transform: translateY(calc(-8px - var(--lift, 0px))) rotate(-2.5deg);
  }

  75% {
    transform: translateY(calc(-8px - var(--lift, 0px))) rotate(2.5deg);
  }
}

.popular-shelf__cover,
.popular-shelf__item .book-cover-wrap.popular-shelf__cover {
  width: 100%;
  max-width: clamp(72px, 12vw, 128px);
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 2px 6px 6px 2px;
  box-shadow:
    2px 4px 12px rgba(28, 24, 22, 0.2),
    inset -2px 0 6px rgba(0, 0, 0, 0.08);
}

.popular-shelf__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
  min-width: 0;
  margin-top: 0.5rem;
  padding: 0.375rem 0.125rem 0;
  text-align: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.popular-shelf__title {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 3px rgba(28, 24, 22, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popular-shelf__rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  width: 100%;
}

.popular-shelf__rating .stars--prominent {
  display: block;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  color: rgba(255, 239, 61, 1);
  line-height: 1;
  text-shadow:
    0 1px 2px rgba(28, 24, 22, 0.5),
    0 0 8px rgba(255, 255, 255, 0.15);
}

.stars--prominent {
  display: block;
  font-size: clamp(1rem, 2vw, 1.375rem);
  letter-spacing: 0.08em;
  color: var(--color-star);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.popular-shelf__score {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 3px rgba(28, 24, 22, 0.45);
}

.popular-shelf__reviews {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 243, 229, 1);
  text-shadow: 0 1px 2px rgba(28, 24, 22, 0.4);
}

@media (max-width: 900px) {
  .popular-shelf__grid {
    --shelf-slot-count: 3;
  }
}

@media (max-width: 520px) {
  .popular-shelf__grid {
    --shelf-slot-count: 2;
  }

  .popular-shelf__cover,
  .popular-shelf__item .book-cover-wrap.popular-shelf__cover {
    max-width: clamp(88px, 38vw, 140px);
  }
}

/* Collections */
/* Collections — mini bookcase cards */
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.list-card {
  transition: transform 0.2s ease;
}

.list-case {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  overflow: visible;
}

.list-case:hover {
  transform: translateY(-4px);
}

.list-case__ledge.reader-shelf__ledge {
  padding: 0 1rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.list-case__ledge.reader-shelf__ledge::after {
  margin: 0 -1rem;
}

.list-case__books {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.25rem, 1.2vw, 0.5rem);
  align-items: end;
  justify-items: center;
  padding: 1.125rem 0 0.75rem;
  min-height: 96px;
}

.list-case__book {
  display: flex;
  justify-content: center;
  width: 100%;
  transform: translateY(calc(-1 * var(--lift, 0px))) rotate(var(--tilt, 0deg));
  transform-origin: bottom center;
  transition: transform 0.2s ease;
}

.list-case:hover .list-case__book {
  transform: translateY(calc(-5px - var(--lift, 0px))) rotate(0deg);
}

.list-case__cover,
.list-case__book .book-cover-wrap.list-case__cover {
  width: 100%;
  max-width: clamp(48px, 16vw, 68px);
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 2px 5px 5px 2px;
  box-shadow:
    2px 3px 10px rgba(28, 24, 22, 0.22),
    inset -2px 0 5px rgba(0, 0, 0, 0.08);
}

.list-case__book--empty {
  width: 100%;
  max-width: clamp(48px, 16vw, 68px);
  aspect-ratio: 2 / 3;
  border-radius: 2px 5px 5px 2px;
  background: linear-gradient(145deg, #c9bc9e 0%, #a89572 55%, #8f7d5e 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    2px 3px 8px rgba(28, 24, 22, 0.15);
  opacity: 0.72;
}

.list-case__info {
  margin: 0;
  padding: 1rem 1.125rem 1.125rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border-top: none;
}

.list-case__info.lib-card::before {
  display: none;
}

.list-case--own .list-case__info {
  border-color: rgba(194, 59, 51, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(194, 59, 51, 0.1),
    0 8px 20px rgba(28, 24, 22, 0.08);
}

.list-case__owner {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: 0.375rem;
}

.list-case__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

.list-case__description {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-case__count {
  margin-top: auto;
}

.list-card--own {
  border-color: rgba(255, 128, 0, 0.35);
}

.list-card__title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.list-card__owner {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  margin-bottom: 0.75rem;
}

.list-card__description {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.875rem;
  line-height: 1.5;
}

.list-card__count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Forms */
.form-card {
  max-width: 420px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-actions {
  margin-top: 1.5rem;
}

.survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.main--survey {
  max-width: 36rem;
  margin: 0 auto;
}

.survey-slip {
  margin-top: 0.5rem;
}

.survey-slip .lib-card__title {
  font-size: 1.625rem;
  margin-bottom: 0.375rem;
}

.survey-slip .lib-card__body {
  margin-bottom: 1.25rem;
}

.survey-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.survey-field {
  margin: 0;
  padding: 0;
  border: none;
}

.survey-field__legend {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.survey-field__hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.survey-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.625rem;
}

.survey-choice {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.75rem 0.875rem;
  background: var(--shelf-color-surface);
  border: var(--shelf-border-paper);
  border-radius: var(--shelf-radius-xs);
  cursor: pointer;
  transition: var(--shelf-transition-surface);
}

.survey-choice:has(input:checked) {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent-soft);
}

.survey-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.survey-choice__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.survey-choice__meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.survey-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.survey-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.survey-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.survey-chip span {
  display: inline-block;
  padding: 0.4375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.survey-chip:has(input:checked) span {
  color: var(--color-accent-hover);
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.survey-wishlist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.survey-wishlist__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--color-shelf-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.survey-wishlist__item:has(input:checked) {
  border-color: var(--color-libby);
  box-shadow: inset 3px 0 0 var(--color-libby);
}

.survey-wishlist__item input {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-libby);
}

.survey-wishlist__cover,
.survey-wishlist__cover.book-cover-wrap {
  width: 2.5rem;
  height: 3.75rem;
  flex-shrink: 0;
  border-radius: 2px 4px 4px 2px;
  box-shadow: var(--cover-shadow);
}

.survey-wishlist__cover--placeholder {
  background: var(--color-border-strong);
}

.survey-wishlist__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.survey-wishlist__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.survey-wishlist__author {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.survey-wishlist__wait {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-shelf-ink);
  letter-spacing: 0.02em;
}

.survey-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px dashed var(--color-border-strong);
}

.survey-slip .flow-alert {
  margin-bottom: 1rem;
}

.libby-connect__failure .btn {
  margin-top: 1.25rem;
}

.rating-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.main--rate {
  max-width: 760px;
  margin: 0 auto;
}

.section.section--rate {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rate-entry {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-elevated);
  overflow: hidden;
  transition: opacity 0.2s, border-color 0.2s;
}

.rate-entry:hover {
  border-color: var(--color-border-strong);
}

.rate-entry__header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
}

.rate-entry .book-cover-wrap {
  width: 80px;
  height: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
}

.rate-entry__intro {
  flex: 1;
  min-width: 0;
}

.rate-entry__title {
  font-weight: var(--shelf-weight-bold);
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.rate-entry__meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.rate-entry__rating .rate-card__stars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem;
  font-size: 2rem;
  line-height: 1;
}

.rate-entry__rating .star-btn {
  font-size: 2.25rem;
  padding: 0.125rem 0.25rem;
  line-height: 1;
  transition: transform 0.12s ease;
}

.rate-entry__rating .star-btn:hover {
  transform: scale(1.12);
}

.rate-entry__rating {
  margin-bottom: 0;
}

.rate-entry__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-subtle);
  margin-bottom: 0.375rem;
}

.rate-entry__compose {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.rate-entry__hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: -0.125rem 0 0.875rem;
  line-height: 1.45;
}

.rate-entry__textarea {
  display: block;
  width: 100%;
  min-height: 200px;
  padding: 1rem 1.125rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  resize: vertical;
}

.rate-entry__textarea::placeholder {
  color: var(--color-text-subtle);
}

.rate-entry__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.rate-entry__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}

.rate-entry__submit {
  min-width: 9.5rem;
}

.rate-entry__feedback {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-libby);
}

.rate-entry__error {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ff6b6b;
}

.rate-entry--posted {
  opacity: 0.72;
  border-color: rgba(0, 200, 150, 0.2);
}

.rate-entry--posted .rate-entry__textarea {
  background: var(--color-surface-elevated);
  border-color: var(--color-border);
}

.rate-page__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
  padding-top: 0;
  border-top: none;
}

.rating-book-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  align-items: center;
}

.rating-book-item .book-cover-wrap {
  width: 64px;
  height: 96px;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
}

.rating-book-item__info {
  flex: 1;
}

.rating-book-item__title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.rating-book-item__meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

@media (max-width: 540px) {
  .rate-entry__header {
    padding: 1rem;
  }

  .rate-entry__compose {
    padding: 1rem;
  }

  .rate-entry .book-cover-wrap {
    width: 64px;
    height: 96px;
  }

  .rate-entry__textarea {
    min-height: 160px;
    font-size: 0.9375rem;
  }

  .rate-entry__submit {
    width: 100%;
  }
}

.hidden {
  display: none !important;
}

/* User flow */
.flow-alert {
  padding: 1rem 1.125rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}

.flow-alert--error {
  background: var(--color-error-bg);
  border-color: var(--color-error-border);
  color: var(--color-error-text);
}

.flow-alert--error:focus {
  outline: 2px solid var(--color-error-border);
  outline-offset: 2px;
}

.flow-alert--success {
  background: var(--color-libby-soft);
  border-color: rgba(0, 200, 150, 0.25);
  color: var(--color-text);
}

.flow-alert--info {
  background: var(--color-accent-soft);
  border-color: rgba(255, 128, 0, 0.25);
  color: var(--color-text);
}

.flow-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

.flow-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border-strong);
  border-top-color: var(--color-libby);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.flow-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.flow-action-bar p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  max-width: 420px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.375rem;
  line-height: 1.5;
}

.form-error {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-error-text);
  margin-top: 0.375rem;
  line-height: 1.5;
}

.form-group input[aria-invalid="true"] {
  border-color: var(--color-error-border);
  box-shadow: 0 0 0 1px var(--color-error-border);
}

.form-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
}

.login-demo {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--shelf-color-border-rule);
  text-align: center;
}

.login-demo__label {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shelf-color-text-muted);
}

.login-demo__btn {
  width: 100%;
}

.login-demo__note {
  margin: 0.75rem 0 0;
  text-align: center;
}

.required {
  color: var(--color-accent);
}

.profile-summary {
  margin: 1rem 0;
  padding: 1.25rem;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.profile-summary__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.625rem;
}

.profile-summary__badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin: 0;
}

.profile-summary__cosmic {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--color-text-subtle);
  margin: 0;
}

.profile-summary__type {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.profile-summary__headline {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.profile-summary__blurb {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-shelf-warm, #c9b896);
}

.profile-summary__reroll {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.profile-summary__reroll-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1;
}

.profile-summary__reroll-book {
  font-size: 0.9375rem;
}

.profile-summary__reroll-refresh {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.92;
}

.profile-summary__traits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.profile-trait {
  font-size: 0.875rem;
  color: var(--color-text);
  padding-left: 1rem;
  position: relative;
}

.profile-trait::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.75rem;
}

.profile-summary__authors {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.suggestions-header {
  margin: 1.5rem 0 1rem;
}

.suggestions-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.suggestions-header p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.suggestion-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  align-items: flex-start;
}

.suggestion-card--accepted {
  border-color: rgba(0, 200, 150, 0.35);
}

.suggestion-card--rejected {
  opacity: 0.55;
}

.suggestion-card__body {
  flex: 1;
  min-width: 0;
}

.suggestion-card__action-type {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.suggestion-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}

.suggestion-card__author {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.suggestion-card__reason {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.suggestion-card__impact {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-libby);
  margin-bottom: 0.75rem;
}

.suggestion-card__status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

/* Dashboard */
.dash-page {
  background: var(--color-bg);
}

.main--dash {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
}

.dash-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.dash-header__eyebrow {
  font-size: 0.8125rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.dash-header h1 {
  font-size: var(--shelf-text-3xl);
  font-weight: var(--shelf-weight-bold);
  letter-spacing: var(--shelf-tracking-tight);
  margin-bottom: var(--shelf-space-2);
}

.dash-header__tagline {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  max-width: 480px;
  line-height: 1.55;
}

.dash-header__tagline strong {
  color: var(--color-text);
}

.dash-header__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  min-width: 0;
}

.dash-header__strip {
  display: flex;
  gap: 0.625rem;
  align-items: flex-end;
  padding-bottom: 0.25rem;
  min-height: 132px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.dash-header__cover {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  text-decoration: none;
  color: inherit;
  transform: translateY(calc(var(--offset) * -3px)) rotate(calc(var(--offset) * -1.5deg));
  transition: transform 0.2s ease, z-index 0s;
  z-index: 0;
}

.dash-header__cover:hover {
  transform: translateY(-10px) rotate(0deg);
  z-index: 3;
}

.dash-header__cover:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.dash-header__cover .book-cover-wrap {
  width: 80px;
  height: 120px;
  border-radius: 4px;
  box-shadow: var(--cover-shadow);
}

.dash-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Reading now — hero block */
.dash-section--reading-now {
  border-bottom: none;
  padding-bottom: 0;
}

.dash-section--reading-now > #readingNowSection {
  padding: 0 1.5rem 1.75rem;
}

.reading-now-hero {
  margin-bottom: 1.25rem;
}

.reading-now-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.375rem;
}

.reading-now-hero__subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
}

.reading-now-connect {
  padding: 1.5rem 1.25rem;
  background: var(--color-surface-elevated);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  text-align: center;
  max-width: 36rem;
}

.reading-now-connect p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0 0 1.25rem;
}

.reading-now-connect__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.reading-now-loans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.reading-now-card {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.125rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.reading-now-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(28, 24, 22, 0.12);
  border-color: rgba(194, 59, 51, 0.35);
}

.reading-now-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.reading-now-card--kindle {
  border-left: 3px solid #f0a020;
}

.reading-now-card--libby {
  border-left: 3px solid var(--color-libby);
}

.reading-now-card__cover .book-cover-wrap {
  width: 72px;
  height: 108px;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
  flex-shrink: 0;
}

.reading-now-card__body {
  flex: 1;
  min-width: 0;
}

.reading-now-card__source {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-subtle);
  margin-bottom: 0.25rem;
}

.reading-now-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.125rem;
}

.reading-now-card__author {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.reading-now-card__meta {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  line-height: 1.45;
  margin-bottom: 0.625rem;
}

.reading-now-card__progress {
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.reading-now-card__progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
}

.reading-now-card--libby .reading-now-card__progress-fill {
  background: var(--color-libby);
}

.reading-now-card--kindle .reading-now-card__progress-fill {
  background: #f0a020;
}

.reading-now-card__progress-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.reading-now-upsell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.finished-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.finished-section__header {
  margin-bottom: 1rem;
}

.finished-section__header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.finished-section__hook {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

.finished-section__empty {
  padding: 1.25rem;
  background: var(--color-surface-elevated);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.finished-section__empty p {
  margin: 0;
}

.finished-section__grid {
  margin-top: 0.25rem;
}

.finished-section__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.reading-now-upsell p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.dash-section {
  position: relative;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.dash-section:last-child {
  border-bottom: none;
}

.dash-section--readnow .dash-section__masthead {
  padding-top: 0.25rem;
}

.dash-section__masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 0;
  align-items: start;
}

.dash-section__masthead--solo {
  grid-template-columns: 1fr;
}

.dash-section__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.375rem;
}

.dash-section--holds .dash-section__eyebrow {
  color: var(--color-libby);
}

.dash-section--readnow .dash-section__eyebrow {
  color: var(--color-accent);
}

.dash-section__copy h2 {
  font-size: 1.5rem;
  font-weight: var(--shelf-weight-bold);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.dash-section__hook {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 420px;
}

.dash-section__visual {
  min-width: 240px;
  max-width: 380px;
}

.dash-section__visual .cover-strip {
  justify-content: flex-end;
}

.dash-section__placeholder {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  border: 1px dashed var(--color-border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-subtle);
  font-size: 0.75rem;
}

.dash-section__placeholder span {
  font-size: 1.5rem;
  font-weight: var(--shelf-weight-bold);
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.dash-section__placeholder--lg {
  width: 100%;
  height: 140px;
}

.dash-section > div:last-child,
.dash-section #readerProfileContent,
.dash-section #holdsContent,
.dash-section #readNowContent,
.dash-section #readingStatsContent {
  padding: 1.25rem 1.5rem 1.75rem;
  overflow: visible;
}

.cover-strip {
  display: flex;
  gap: 0.625rem;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 0.5rem 0 0.75rem;
  margin-top: -0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface-elevated) transparent;
}

.cover-strip::-webkit-scrollbar {
  height: 6px;
}

.cover-strip::-webkit-scrollbar-thumb {
  background: var(--color-surface-elevated);
  border-radius: var(--radius-pill);
}

.cover-strip__item {
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  position: relative;
  z-index: 0;
}

.cover-strip__item:hover {
  z-index: 2;
}

.cover-strip__item .book-cover-wrap {
  width: 64px;
  height: 96px;
  border-radius: 4px;
  box-shadow: var(--cover-shadow);
  transition: transform 0.15s;
}

.cover-strip__item:hover .book-cover-wrap {
  transform: translateY(-6px);
}

.cover-strip__item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.cover-strip--fan .cover-strip__item .book-cover-wrap {
  width: 84px;
  height: 126px;
}

.cover-strip--fan .cover-strip__item:nth-child(2) {
  transform: translateY(-10px);
  transition: transform 0.18s ease;
}

.cover-strip--fan .cover-strip__item:nth-child(3) {
  transform: translateY(-5px);
  transition: transform 0.18s ease;
}

.cover-strip--fan .cover-strip__item:nth-child(4) {
  transform: translateY(-2px);
  transition: transform 0.18s ease;
}

.cover-strip--fan .cover-strip__item:hover {
  transform: translateY(-12px);
}

.cover-strip--readnow .cover-strip__item .book-cover-wrap {
  width: 52px;
  height: 78px;
}

.cover-strip--teaser .cover-strip__item .book-cover-wrap {
  opacity: 0.7;
  filter: blur(1px);
}

.cover-strip__label {
  display: block;
  font-size: 0.625rem;
  color: var(--color-text-muted);
  margin-top: 0.375rem;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover-strip--rate .cover-strip__item--rate {
  width: 88px;
}

.cover-strip--rate .book-cover-wrap {
  width: 88px;
  height: 132px;
}

.slot-meter {
  margin-bottom: 1.25rem;
  padding: 1rem 1.125rem;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.slot-meter--holds {
  border-color: rgba(0, 200, 150, 0.2);
}

.slot-meter--loans {
  border-color: rgba(255, 128, 0, 0.2);
}

.slot-meter__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.625rem;
}

.slot-meter__header strong {
  color: var(--color-text);
}

.slot-meter__track {
  height: 8px;
  background: var(--color-bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.slot-meter--holds .slot-meter__fill {
  height: 100%;
  background: var(--color-libby);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.slot-meter--loans .slot-meter__fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.pill {
  display: inline-flex;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill--libby {
  background: var(--color-libby-soft);
  color: var(--color-libby);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.status-badge--connected {
  background: var(--color-libby-soft);
  color: var(--color-libby);
  border: 1px solid rgba(61, 107, 90, 0.22);
  box-shadow: none;
}

.status-badge--connected::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-libby);
  flex-shrink: 0;
}

/* Reader profile — physical shelf */
.reader-shelf {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.reader-shelf__plaque {
  margin-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  z-index: 2;
}

.reader-shelf__name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.reader-shelf__library {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
}

.reader-shelf__stats {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-shelf-ink);
  letter-spacing: 0.02em;
}

.reader-shelf__ledge {
  position: relative;
  padding: 0 clamp(0.75rem, 2.5vw, 1.75rem) 0.5rem;
  background: linear-gradient(180deg, var(--color-shelf-warm) 0%, #a89572 100%);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  box-shadow: 0 6px 16px rgba(28, 24, 22, 0.12);
}

.reader-shelf__ledge::after {
  content: "";
  display: block;
  height: clamp(8px, 1.2vw, 12px);
  margin: 0 calc(-1 * clamp(0.75rem, 2.5vw, 1.75rem)) -0.5rem;
  background: linear-gradient(180deg, #a89572 0%, #8f7d5e 100%);
  border-radius: 0 0 2px 2px;
}

.reader-shelf__books {
  --shelf-slot-count: 6;
  --shelf-gap: clamp(0.375rem, 1.25vw, 1rem);
  display: grid;
  grid-template-columns: repeat(var(--shelf-slot-count), minmax(0, 1fr));
  gap: var(--shelf-gap);
  align-items: end;
  justify-items: center;
  width: 100%;
  padding: clamp(1rem, 2.5vw, 1.75rem) 0 clamp(0.75rem, 1.5vw, 1rem);
  box-sizing: border-box;
}

.reader-shelf__book {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  transform: translateY(calc(-1 * var(--lift, 0px))) rotate(var(--tilt, 0deg));
  transform-origin: bottom center;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 0;
}

.reader-shelf__book:hover {
  transform: translateY(calc(-6px - var(--lift, 0px))) rotate(0deg);
  z-index: 2;
}

.reader-shelf__book:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.reader-shelf__cover,
.reader-shelf__book .book-cover-wrap.reader-shelf__cover {
  width: 100%;
  max-width: clamp(76px, 13.5vw, 132px);
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 2px 6px 6px 2px;
  box-shadow:
    2px 4px 12px rgba(28, 24, 22, 0.2),
    inset -3px 0 8px rgba(0, 0, 0, 0.08);
}

.reader-shelf__cover .book-cover,
.reader-shelf__book .book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 599px) {
  .reader-shelf__books {
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    gap: 0.625rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    scrollbar-width: thin;
  }

  .reader-shelf__book {
    flex: 0 0 auto;
    width: auto;
    scroll-snap-align: center;
  }

  .reader-shelf__cover,
  .reader-shelf__book .book-cover-wrap.reader-shelf__cover {
    width: clamp(68px, 22vw, 92px);
    max-width: none;
  }
}

@media (min-width: 900px) {
  .reader-shelf__cover,
  .reader-shelf__book .book-cover-wrap.reader-shelf__cover {
    max-width: clamp(100px, 11vw, 140px);
  }
}

.reader-shelf__ledger {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border-top: none;
  margin-top: -1px;
}

.reader-shelf__ledger .profile-summary {
  margin-bottom: 1rem;
}

.reader-shelf__actions {
  margin-top: 0.5rem;
}

.profile-card--rich {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: transparent;
}

.profile-card__hero {
  padding: 1rem 1rem 0;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.profile-card__body {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--color-surface-elevated);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border-top: 1px solid var(--color-border);
}

.cover-strip--profile-inline .book-cover-wrap {
  width: 80px;
  height: 120px;
}

.holds-list--visual {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.holds-list--compact,
.holds-list--unified {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.holds-list--compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.holds-panel__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.125rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.holds-panel__summary p {
  margin: 0;
}

.holds-panel__summary .form-hint {
  flex: 1 1 100%;
  margin-top: -0.25rem;
}

.holds-panel__body {
  margin-top: 0;
}

.holds-overview {
  margin-bottom: 1.25rem;
  padding: 1rem 1.125rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.holds-overview__summary {
  margin: 0 0 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--color-text);
}

.holds-overview .slot-meter {
  margin-bottom: 0.875rem;
}

.holds-overview__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.holds-overview__actions .btn--primary {
  flex: 1 1 auto;
  min-width: 10rem;
}

.holds-overview__actions .btn--secondary {
  flex: 0 0 auto;
}

.holds-panel__body[hidden] {
  display: none;
}

.hold-row--compact-card {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.875rem 0.75rem 2.25rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-width: 0;
}

.hold-row--compact-card .hold-row__cover {
  flex-shrink: 0;
  text-decoration: none;
}

.hold-row--compact-card .book-cover-wrap--hold-libby {
  width: 52px;
  height: 78px;
}

.hold-row--compact-card .hold-row__title {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.hold-row--compact-card .hold-row__author {
  font-size: 0.75rem;
}

.hold-row__wait--compact {
  font-size: 1rem;
  margin: 0;
}

.rate-preview-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: flex-start;
  width: 100%;
  gap: 1rem 0.75rem;
}

/* Finished section: distribute cards evenly across the row */
.finished-section__grid.rate-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.75rem, 1fr));
  gap: 1.25rem 1rem;
  justify-content: initial;
  align-items: start;
}

@media (min-width: 900px) {
  .finished-section__grid.rate-preview-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Finished cards: slightly larger cover + type */
.finished-section__grid .rate-preview__card {
  flex: initial;
  max-width: none;
  padding: 0.75rem 0.5rem;
}

.finished-section__grid .rate-preview__cover {
  width: 80px;
  height: 120px;
  margin-bottom: 0.625rem;
}

.finished-section__grid .rate-preview__stars {
  font-size: 1.0625rem;
}

.finished-section__grid .rate-preview__prompt {
  font-size: 0.75rem;
  margin-bottom: 0.375rem;
}

.finished-section__grid .rate-preview__title {
  font-size: 0.8125rem;
  color: var(--color-text);
}

.rate-preview__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  flex: 0 1 7.5rem;
  max-width: 7.75rem;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-md);
  transition: background 0.15s ease, transform 0.15s ease;
}

.rate-preview__card:hover {
  background: var(--color-accent-soft);
  transform: translateY(-2px);
}

.rate-preview__card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.rate-preview__cover {
  width: 72px;
  height: 108px;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
  margin-bottom: 0.5rem;
}

.rate-preview__stars {
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--color-star, #e8b84a);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.rate-preview__prompt {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.rate-preview__prompt--done {
  color: var(--color-libby);
}

.rate-preview__prompt--date {
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.rate-preview__title {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hold-row--unified {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.hold-row__position {
  flex: 1;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.875rem 1rem 1rem;
  min-width: 0;
}

.hold-row--has-suggestion .hold-row__position {
  flex: 1.15;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
}

.hold-row__cover {
  flex-shrink: 0;
}

.hold-row__cover .book-cover-wrap--hold-libby {
  width: 72px;
  height: 108px;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
  overflow: hidden;
}

.hold-row__cover .book-cover {
  object-fit: cover;
}

.hold-row__info {
  flex: 1;
  min-width: 0;
}

.hold-row__author {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  margin-bottom: 0.125rem;
}

.hold-row__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.625rem;
}

.hold-row--has-suggestion .hold-row__title {
  font-size: 1rem;
}

.hold-row__libby-stack {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-elevated);
}

.hold-row__libby-row {
  padding: 0.5625rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.hold-row__libby-row:last-child {
  border-bottom: none;
}

.hold-row__libby-row--wait {
  padding: 0.625rem 0.75rem;
  background: var(--color-surface);
}

.hold-row__libby-row--placed {
  padding-top: 0.4375rem;
  padding-bottom: 0.4375rem;
}

.hold-row__libby-value {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text);
}

.hold-row__libby-value--muted,
.hold-row__libby-muted {
  color: var(--color-text-subtle);
  font-size: 0.75rem;
}

.hold-row__recommendation {
  flex: 1;
  min-width: 220px;
  max-width: 44%;
  display: flex;
  flex-direction: column;
  padding: 0.875rem 1rem 1rem;
  background: var(--color-shelf-paper);
  border-left: 3px solid var(--color-accent);
}

.hold-row__recommendation--release {
  border-left-color: #e85d5d;
  background: rgba(255, 107, 107, 0.06);
}

.hold-row__recommendation--add {
  border-left-color: var(--color-libby);
  background: rgba(0, 200, 150, 0.06);
}

.hold-row__recommendation--keep,
.hold-row__recommendation--shelf {
  border-left-color: var(--color-shelf-warm);
}

.hold-row__recommendation-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.hold-row__recommendation--release .hold-row__recommendation-eyebrow {
  color: #e85d5d;
}

.hold-row__recommendation--add .hold-row__recommendation-eyebrow {
  color: var(--color-libby);
}

.hold-row--add-slot {
  border-style: dashed;
  border-color: rgba(0, 200, 150, 0.25);
}

.hold-row__meta--open span:first-child {
  color: var(--color-libby);
  font-weight: 600;
}

.hold-row__suggestion {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.875rem 1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.hold-row--action-keep .hold-row__suggestion-label,
.hold-row--action-shelf .hold-row__suggestion-label,
.suggestion-card__action-type--keep,
.suggestion-card__action-type--shelf {
  color: var(--color-shelf-ink);
}

.hold-row__suggestion-label {
  margin-bottom: 0.375rem;
}

.hold-row__suggestion-reason {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 0.375rem;
}

.hold-row__suggestion-impact {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-libby);
  margin-bottom: 0.875rem;
}

.hold-row__suggestion--release .hold-row__suggestion-impact {
  color: #ff8a8a;
}

.hold-row__suggestion--keep .hold-row__suggestion-impact,
.hold-row__suggestion--shelf .hold-row__suggestion-impact {
  color: var(--color-shelf-ink);
}

.hold-row__suggestion-actions {
  margin-top: 0;
}

.hold-row__suggestion-status {
  margin: 0;
}

.hold-row--accepted {
  border-color: rgba(0, 200, 150, 0.2);
}

.hold-row--rejected {
  opacity: 0.72;
}

.hold-row--action-release.hold-row--accepted {
  border-color: rgba(255, 107, 107, 0.25);
}

.hold-row--action-add.hold-row--accepted {
  border-color: rgba(0, 200, 150, 0.25);
}

.hold-row--action-keep.hold-row--accepted,
.hold-row--action-shelf.hold-row--accepted {
  border-color: rgba(201, 184, 150, 0.55);
}

.hold-row--card {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.hold-row--card .book-cover-wrap {
  width: 100%;
  height: 160px;
  border-radius: 0;
  box-shadow: none;
}

.hold-row--card .hold-row__info {
  padding: 0.875rem 1rem 1rem;
}

.suggestions-list--holds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
}

.suggestion-card--hold {
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.suggestion-card--hold .book-cover-wrap {
  width: 100%;
  height: 140px;
  border-radius: 0;
}

.suggestion-card--hold .suggestion-card__body {
  padding: 1rem;
}

.suggestion-card__action-type--release {
  color: #ff6b6b;
}

.suggestion-card__action-type--add {
  color: var(--color-libby);
}

.suggestion-card__action-type--keep {
  color: var(--color-accent);
}

.suggestion-card__status--release {
  color: #ff6b6b;
}

.suggestion-card__status--add {
  color: var(--color-libby);
}

.suggestion-card__status--keep {
  color: var(--color-accent);
}

.suggestion-card--action-release.suggestion-card--accepted {
  border-color: rgba(255, 107, 107, 0.25);
}

.suggestion-card--action-add.suggestion-card--accepted {
  border-color: rgba(0, 200, 150, 0.25);
}

.suggestion-card--action-keep.suggestion-card--accepted {
  border-color: rgba(255, 128, 0, 0.25);
}

.flow-action-bar--holds {
  background: rgba(0, 200, 150, 0.06);
  border-color: rgba(0, 200, 150, 0.15);
}

.hold-row--unified.hold-row--slot-numbered,
.hold-row.hold-row--slot-numbered {
  position: relative;
}

.hold-row__slot-index {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: var(--shelf-weight-bold);
  line-height: 1;
  border-radius: var(--radius-sm);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-strong);
  color: var(--color-accent);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.hold-row--slot-numbered .hold-row__position {
  padding-left: 2.5rem;
}

.hold-row__wait {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
}

.readnow-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.cover-strip--preview .book-cover-wrap {
  filter: blur(7px) saturate(0.65);
  transform: scale(1.04);
}

.cover-strip--preview .cover-strip__label {
  opacity: 0;
}

@keyframes readnowReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.readnow-panel--revealed {
  animation: readnowReveal 0.55s ease forwards;
}

.readnow-panel .readnow-featured {
  margin-bottom: 1.5rem;
}

.readnow-featured {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  padding: 1.25rem;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 128, 0, 0.2);
  margin-bottom: 1.5rem;
}

.readnow-featured__cover .book-cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  box-shadow: var(--cover-shadow);
  border-radius: var(--radius-sm);
}

.readnow-featured__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.readnow-featured h3 {
  font-size: 1.375rem;
  font-weight: var(--shelf-weight-bold);
  margin: 0.5rem 0 0.25rem;
  letter-spacing: -0.02em;
}

.readnow-featured__author {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.readnow-featured__reason {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.readnow-more h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.readnow-more > p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.readnow-tile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  margin-bottom: 0.375rem;
}

.readnow-tile__tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-shelf-paper);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.readnow-tile__reason {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.readnow-tile__author {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
}

.readnow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.readnow-tile {
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.readnow-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 128, 0, 0.35);
}

.readnow-tile .book-cover-wrap {
  width: 100%;
  height: 180px;
  border-radius: 0;
  box-shadow: none;
}

.readnow-tile__body {
  padding: 0.75rem;
}

.readnow-tile__match {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-accent);
}

.readnow-tile h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  margin: 0.25rem 0;
  line-height: 1.3;
}

.stats-scale.community-scale {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}

.stats-scale__card {
  min-height: 148px;
}

.stats-scale .community-scale__value {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
}

.stats-scale .community-scale__label {
  font-size: 0.9375rem;
}

.dash-empty {
  padding: 2rem;
  text-align: center;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border-strong);
}

.dash-empty__title {
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.dash-empty p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.dash-subsection {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.dash-subsection__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dash-subsection__header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dash-subsection--rate .dash-subsection__header h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.375rem;
}

.dash-subsection__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.dash-subsection__hook {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 36rem;
}

.stats-highlight--visual .stat-card--poster {
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.stat-card--with-cover .book-cover-wrap {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 72px;
  opacity: 0.9;
}

@media (max-width: 900px) {
  .publisher-cards,
  .community-scale {
    grid-template-columns: 1fr;
  }

  .community-scale__value {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .dash-header {
    grid-template-columns: 1fr;
  }

  .dash-header__aside {
    align-items: flex-start;
    width: 100%;
  }

  .dash-header__strip {
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .dash-section__masthead {
    grid-template-columns: 1fr;
  }

  .dash-section__visual {
    max-width: none;
  }

  .readnow-teaser {
    grid-template-columns: 1fr;
  }

  .readnow-featured {
    grid-template-columns: 1fr;
  }

  .profile-card__body {
    flex-direction: column;
  }

  .holds-list--compact-grid {
    grid-template-columns: 1fr;
  }

  .hold-row--unified.hold-row--has-suggestion {
    flex-direction: column;
  }

  .hold-row--has-suggestion .hold-row__position {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .hold-row__recommendation {
    max-width: none;
    border-left: none;
    border-top: 3px solid var(--color-accent);
  }

  .hold-row__recommendation--release {
    border-top-color: #e85d5d;
  }

  .hold-row__recommendation--add {
    border-top-color: var(--color-libby);
  }

  .hold-row__recommendation--keep,
  .hold-row__recommendation--shelf {
    border-top-color: var(--color-shelf-warm);
  }
}

/* Mock Libby connect */
.libby-connect-page {
  background: #0d3d34;
  min-height: 100vh;
}

.libby-connect {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.libby-connect__shell {
  width: 100%;
  max-width: 440px;
  background: #f7f9f8;
  color: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.libby-connect__header {
  background: linear-gradient(180deg, #0f7669 0%, #0d5c52 100%);
  color: #fff;
  text-align: center;
  padding: 1.75rem 1.5rem 1.5rem;
}

.libby-connect__logo {
  font-size: 2rem;
  font-weight: var(--shelf-weight-bold);
  letter-spacing: -0.03em;
}

.libby-connect__byline {
  font-size: 0.8125rem;
  opacity: 0.85;
  margin-top: 0.125rem;
}

.libby-connect__panel {
  padding: 1.75rem 1.5rem 1.5rem;
}

.libby-connect__panel h1,
.libby-connect__panel h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  color: #1a1a1a;
}

.libby-connect__lead {
  font-size: 0.9375rem;
  color: #4a5568;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.libby-connect__app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: #e8f5f1;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0d5c52;
  margin-bottom: 1rem;
}

.libby-connect__app-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #ff8000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: var(--shelf-weight-bold);
}

.libby-connect__library {
  padding: 1rem;
  background: #eef2f1;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.libby-connect__library-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #718096;
  margin-bottom: 0.25rem;
}

.libby-connect__library-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
}

.libby-connect__permissions {
  list-style: none;
  margin-bottom: 1rem;
}

.libby-connect__permissions li {
  position: relative;
  padding-left: 1.375rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #2d3748;
}

.libby-connect__permissions li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #0d9488;
  font-weight: 700;
}

.libby-connect__demo-note {
  font-size: 0.75rem;
  color: #718096;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.libby-connect__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.libby-connect__actions .btn--ghost {
  color: #4a5568;
  border-color: #cbd5e0;
}

.libby-connect__steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.libby-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #718096;
}

.libby-step__indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e0;
  flex-shrink: 0;
}

.libby-step--active {
  color: #1a1a1a;
  font-weight: 600;
}

.libby-step--active .libby-step__indicator {
  border-color: #0d9488;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

.libby-step--done {
  color: #0d9488;
}

.libby-step--done .libby-step__indicator {
  background: #0d9488;
  border-color: #0d9488;
  position: relative;
}

.libby-step--done .libby-step__indicator::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.libby-step--error {
  color: #c53030;
  font-weight: 600;
}

.libby-step--error .libby-step__indicator {
  background: #c53030;
  border-color: #c53030;
}

.libby-connect__progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.libby-connect__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0d9488, #14b8a6);
  border-radius: var(--radius-pill);
  transition: width 0.45s ease;
}

.libby-connect__success,
.libby-connect__failure {
  text-align: center;
  padding: 1rem 0;
}

.libby-connect__success-icon,
.libby-connect__failure-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.libby-connect__success-icon {
  background: #c6f6d5;
  color: #22543d;
}

.libby-connect__failure-icon {
  background: #fed7d7;
  color: #742a2a;
}

.libby-connect__success p,
.libby-connect__failure p {
  font-size: 0.9375rem;
  color: #4a5568;
  line-height: 1.5;
}

.libby-connect__footer {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* ── Site header & logo ── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Site header shell — see components.css */

.shelf-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--color-text);
  justify-self: start;
}

.shelf-logo__mark {
  color: var(--color-accent);
}

.shelf-logo__word {
  font-family: var(--shelf-font-brand);
  font-size: 1.5rem;
  font-weight: var(--shelf-weight-regular);
  letter-spacing: var(--shelf-tracking-tight);
  line-height: 1;
}

.site-header__search-wrap {
  position: relative;
  width: 100%;
  max-width: 26rem;
  min-width: 0;
  justify-self: center;
}

.site-search__icon {
  font-size: 1rem;
  line-height: 1;
  color: var(--color-text-subtle);
  flex-shrink: 0;
}

.site-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--shelf-font-ui);
  font-size: var(--shelf-text-base);
  color: var(--shelf-color-text);
  outline: none;
  padding: 0;
  width: auto;
}

.site-search__input::placeholder {
  color: var(--color-text-subtle);
}

.site-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.site-search__results {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  max-height: 18rem;
  overflow-y: auto;
  background: var(--shelf-color-surface);
  border: var(--shelf-border-paper);
  padding: var(--shelf-space-1);
}

.site-search__result {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
}

.site-search__result:hover {
  background: var(--color-surface-elevated);
}

.site-search__result-title {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  text-decoration: none;
  color: var(--color-text);
}

.site-search__result-title:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.site-search__result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  margin: 0;
}

.text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(28, 24, 22, 0.38);
  text-underline-offset: 0.14em;
  transition:
    color 0.12s,
    text-decoration-color 0.12s;
}

.text-link:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

.text-link--author {
  font-weight: 600;
  color: var(--color-text-muted);
}

.text-link--author:hover {
  color: var(--color-accent);
}

.genre-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5625rem;
  border-radius: var(--shelf-radius-pill);
  font-family: var(--shelf-font-data);
  font-size: var(--shelf-text-xs);
  font-weight: var(--shelf-weight-medium);
  letter-spacing: var(--shelf-tracking-data);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--shelf-color-teal);
  background: var(--shelf-color-teal-soft);
  border: 1px solid var(--shelf-color-teal);
  transition: var(--shelf-transition-surface);
}

.genre-tag:hover {
  color: var(--color-popular, #3d6b5a);
  background: rgba(61, 107, 90, 0.16);
  border-color: rgba(61, 107, 90, 0.38);
  text-decoration: underline;
  text-underline-offset: 0.1em;
}

.site-search__empty {
  padding: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
}

.site-search__see-all {
  display: block;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  border-top: 1px solid var(--color-border);
  margin-top: 0.25rem;
}

.site-search__see-all:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.site-search__source {
  display: inline-flex;
  align-items: center;
  padding: 0.0625rem 0.375rem;
  border-radius: var(--shelf-radius-pill);
  font-family: var(--shelf-font-data);
  font-size: 0.625rem;
  font-weight: var(--shelf-weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--shelf-color-teal);
  background: var(--shelf-color-teal-soft);
  border: 1px solid var(--shelf-color-teal);
}

.site-header__profile-wrap {
  position: relative;
  margin-left: 0.25rem;
}

.site-header__profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}

.user-avatar--nav {
  width: 2rem;
  height: 2rem;
  font-size: 0.625rem;
}

.site-header__profile-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(32rem, calc(100vh - 5rem));
  overflow-y: auto;
  z-index: 250;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(28, 24, 22, 0.14);
  padding: 1rem;
}

.profile-popover__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-subtle);
  margin-bottom: 0.75rem;
}

.profile-popover__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.profile-popover__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.125rem;
}

.profile-popover__meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.profile-popover__stats {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.875rem;
}

.profile-popover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.profile-popover__dashboard {
  display: block;
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.profile-popover__dashboard:hover {
  text-decoration: underline;
}

.profile-popover__footer {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--color-border);
}

.profile-popover__logout {
  width: 100%;
  justify-content: center;
}

.profile-popover__loading {
  text-align: center;
  padding: 0.5rem 0;
}

.profile-popover__loading p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0.75rem 0;
}

.profile-summary--compact {
  margin: 0;
  padding: 0.875rem;
}

.profile-summary--compact .profile-summary__type {
  font-size: 1.25rem;
}

.profile-summary--compact .profile-summary__blurb {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 900px) {
  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 0.625rem;
  }

  .shelf-logo {
    justify-self: auto;
  }

  .site-header__search-wrap {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    justify-self: auto;
  }

  .site-header__nav {
    margin-left: auto;
    justify-self: auto;
  }

  .site-header__link {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 520px) {
  .site-header__nav .btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Landing / Hero ── */

.main--landing {
  padding: 0;
  max-width: none;
}

.landing-grid {
  padding: 0 clamp(1.25rem, 4vw, 3rem) 4rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
}

.landing-block {
  scroll-margin-top: 5rem;
}

.landing-block__intro {
  max-width: 36rem;
  margin-bottom: 2rem;
}

.landing-block__eyebrow {
  font-family: var(--font-catalog);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-shelf-ink);
  margin-bottom: 0.625rem;
}

.landing-block__intro h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 0.625rem;
}

.landing-block__intro p {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.landing-block--cta {
  text-align: center;
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--color-border);
}

.landing-block--cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.landing-block--cta p {
  color: var(--color-text-muted);
  max-width: 28rem;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.landing-block--cta .landing-block__eyebrow {
  justify-content: center;
  display: inline-block;
}

.hero {
  position: relative;
  min-height: clamp(420px, 72vh, 620px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: 2rem;
}

.hero__mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
  transform: scale(1.08);
  filter: saturate(1.1);
}

.hero__mosaic-item {
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.hero__mosaic-item .book-cover {
  object-fit: cover;
  animation: heroCoverDrift 22s ease-in-out infinite;
  will-change: transform;
}

.hero__mosaic-item:nth-child(3n + 1) .book-cover {
  animation-duration: 26s;
  animation-delay: -4s;
}

.hero__mosaic-item:nth-child(3n + 2) .book-cover {
  animation-duration: 19s;
  animation-delay: -9s;
}

.hero__mosaic-item:nth-child(3n) .book-cover {
  animation-duration: 24s;
  animation-delay: -14s;
}

@keyframes heroCoverDrift {
  0%,
  100% {
    transform: scale(1.08) translate3d(0, 0, 0);
  }

  50% {
    transform: scale(1.16) translate3d(-2%, -1.5%, 0);
  }
}

.hero__mosaic-item .book-cover-wrap {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--color-bg) 0%, rgba(244, 239, 230, 0.94) 38%, rgba(244, 239, 230, 0.72) 100%),
    linear-gradient(to right, rgba(244, 239, 230, 0.92) 0%, transparent 55%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 5vw, 3.5rem);
  max-width: 720px;
}

.hero__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: var(--shelf-weight-bold);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero__title-accent {
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero__explore {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero__explore-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  background: rgba(255, 252, 247, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.hero__explore-link:hover {
  background: var(--color-surface-elevated);
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.hero__explore-emoji {
  font-size: 1rem;
  line-height: 1;
}

.poster-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 0.5rem 0 1.25rem;
  margin-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface-elevated) transparent;
}

.poster-row__item {
  flex-shrink: 0;
  width: 100px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease;
  scroll-snap-align: start;
}

.poster-row__item:hover {
  transform: translateY(-4px);
}

.poster-row__item .book-cover-wrap {
  width: 100px;
  height: 150px;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
  margin-bottom: 0.5rem;
}

.poster-row__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .main {
    padding: 1.5rem 1.25rem 2rem;
  }

  .main--landing {
    padding: 0;
  }

  .landing-sections {
    padding: 0 1.25rem 2rem;
  }

  .hero__mosaic {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .community-stats,
  .publisher-cards,
  .community-scale {
    grid-template-columns: 1fr;
  }

  .hold-row__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .main--feed .review-snippet__inner {
    gap: 1rem;
  }

  .main--feed .review-snippet__cover,
  .main--feed .review-snippet__inner .review-snippet__cover {
    width: 72px;
    height: 108px;
  }
}

.review-snippet__content--full {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.review-snippet__header--with-avatar {
  align-items: center;
  gap: 0.75rem;
}

.review-snippet__who {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
}

.review-snippet__who-meta {
  min-width: 0;
}

.review-snippet__who-meta .lib-card__catalog {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--avatar-bg, #6b5d4f);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow:
    0 2px 6px rgba(28, 24, 22, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.user-avatar--own {
  box-shadow:
    0 0 0 2px var(--color-accent),
    0 2px 6px rgba(28, 24, 22, 0.18);
}

.feed-snippet--own .user-avatar {
  box-shadow:
    0 0 0 2px var(--color-accent),
    0 2px 6px rgba(28, 24, 22, 0.18);
}

.review-snippet__text--empty {
  font-style: italic;
  color: var(--color-text-subtle);
}

.book-posted-success {
  margin: 0 0 1.75rem;
  scroll-margin-top: 5rem;
}

.book-posted-success__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.book-posted-success__text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 1.125rem;
}

.book-posted-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

/* Book detail page */
.main--book {
  max-width: var(--shelf-content-max);
}

.book-hero {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  padding-bottom: 2.75rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--color-border);
}

.book-hero__primary {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 2.75rem 3rem;
  align-items: start;
}

.book-hero__body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

.book-hero__intro {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.book-hero__context {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.book-hero__context:empty {
  display: none;
}

.book-hero__cover-art,
.book-hero__cover .book-cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
}

.book-hero__stamp {
  margin: 0;
}

.book-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.875rem;
  margin: 0.25rem 0 0;
}

.book-hero__meta-detail {
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
  letter-spacing: 0.02em;
}

.book-hero__your-book {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.book-hero__library-note {
  margin: 0;
  font-family: var(--font-register);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.book-hero__shelf-actions .book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.book-hero__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.book-status-pill {
  display: inline-block;
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.book-status-pill--loan {
  background: rgba(255, 128, 0, 0.12);
  color: var(--color-accent);
}

.book-status-pill--returned {
  background: var(--color-libby-soft);
  color: var(--color-libby);
}

.book-status-pill--hold {
  background: var(--color-libby-soft);
  color: var(--color-libby);
}

.book-status-pill--available {
  background: rgba(61, 107, 90, 0.12);
  color: var(--color-popular);
}

.book-status-pill--rate {
  background: var(--color-shelf-paper);
  color: var(--color-shelf-ink);
}

.book-hero__rating-block {
  display: grid;
  grid-template-columns: minmax(0, 148px) 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
  margin: 0;
  padding: 1.375rem 1.5rem;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.book-hero__rating-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.book-hero__score {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.book-hero__rating-main .stars--prominent {
  font-size: 1.125rem;
}

.book-hero__rating-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-subtle);
  margin: 0;
}

.rating-histogram {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.rating-histogram__row {
  display: grid;
  grid-template-columns: 1.75rem 1fr 2.25rem;
  gap: 0.5rem;
  align-items: center;
}

.rating-histogram__label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-subtle);
  text-align: right;
}

.rating-histogram__bar {
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.rating-histogram__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-star) 0%, #e8b84a 100%);
  border-radius: var(--radius-pill);
  min-width: 2px;
  transition: width 0.35s ease;
}

.rating-histogram__pct {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums;
}

.book-activity {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.book-lists-featured__heading,
.book-similar__heading {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.book-lists-featured__shelves {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-lists-featured__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.book-lists-featured__link .list-case {
  margin: 0;
}

.book-lists-featured__link:hover .list-case__info {
  border-color: var(--color-accent);
}

.book-rec-card__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.book-rec-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem 0.875rem;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: border-color 0.15s;
}

.book-rec-card:hover {
  border-color: var(--color-border-strong);
}

.book-rec-card__cover,
.book-rec-card .book-cover-wrap.book-rec-card__cover {
  width: 100%;
  max-width: 88px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
  margin-bottom: 0.5rem;
}

.book-rec-card__title {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-rec-card__rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.book-rec-card__stars {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--color-star);
}

.book-rec-card__score {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-subtle);
}

.book-review-tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.book-review-tab {
  padding: 0.4375rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--color-text-muted);
}

.book-review-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.book-review-tab.active {
  background: var(--color-text);
  color: var(--color-bg);
}

.book-reviews__list.review-list {
  gap: 1rem;
}

.book-review-snippet.feed-snippet--highlight {
  border-color: var(--color-accent);
  box-shadow:
    inset 0 0 0 1px rgba(194, 59, 51, 0.2),
    0 12px 32px rgba(28, 24, 22, 0.1);
  animation: feedHighlightPulse 1.4s ease;
}

.book-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: var(--shelf-weight-bold);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
}

.book-hero__author {
  font-size: 1.0625rem;
  margin: 0;
}

.book-hero__author .text-link--author {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.search-results__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.search-results__card {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-results__card:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 6px 18px rgba(28, 24, 22, 0.08);
}

.search-results__cover,
.search-results__card .book-cover-wrap.search-results__cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  box-shadow: var(--cover-shadow);
  margin-bottom: 0.625rem;
}

.search-results__title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.search-results__author {
  display: block;
  margin-bottom: 0.5rem;
}

.search-results__genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.search-results__empty,
.search-results__loading {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.book-loading {
  padding: 2rem;
  text-align: center;
}

.book-loading__text {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.search-results__empty {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.book-hero__rating {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

.book-hero__rating strong {
  color: var(--color-text);
}

.book-hero__rating--empty {
  color: var(--color-text-subtle);
  padding: 0.75rem 0;
}

.book-hero__synopsis {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin: 0;
  max-width: 38rem;
}

.book-hero__lists-band {
  padding-top: 0.25rem;
}

.book-hero__lists-band[hidden] {
  display: none !important;
}

.book-hero__lists-label {
  margin: 0 0 1rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-subtle);
}

.book-hero__lists-shelves {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.book-hero__lists-shelves .list-case__description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: center;
  padding-top: 1.25rem;
  margin: 0;
  border-top: 1px solid var(--color-border);
}

.book-hero__libby-hint {
  flex: 1 1 100%;
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
  line-height: 1.5;
}

.book-reviews__header {
  margin-bottom: 1.75rem;
}

.book-reviews {
  margin-top: 0.5rem;
}

.book-reviews__header h2 {
  font-size: 1.25rem;
  font-weight: var(--shelf-weight-bold);
  margin-bottom: 0.375rem;
}

.book-reviews__header p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.book-reviews__list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.book-review-card {
  padding: 1rem 1.125rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.book-review-card--own .book-review-card__avatar {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.book-review-card--highlight {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(255, 128, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.25);
  animation: feedHighlightPulse 1.4s ease;
}

.book-review-card__header {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  margin-bottom: 0.625rem;
}

.book-review-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
}

.book-review-card__user {
  font-weight: 600;
  font-size: 0.875rem;
}

.book-review-card__you {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
}

.book-review-card__time {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.book-review-card__tag {
  margin-left: auto;
  padding: 0.25rem 0.625rem;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.book-review-card__text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: 0.5rem;
}

.book-review-card__text--empty {
  font-style: italic;
  color: var(--color-text-subtle);
}

.book-reviews__empty,
.book-empty {
  padding: 2rem;
  text-align: center;
  background: var(--color-surface-elevated);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.book-empty h1 {
  margin-bottom: 0.5rem;
}

.book-empty .btn {
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .book-hero {
    gap: 2rem;
  }

  .book-hero__primary {
    grid-template-columns: 120px 1fr;
    gap: 1.25rem 1.5rem;
  }

  .book-hero__body {
    gap: 1.5rem;
  }

  .book-hero h1 {
    font-size: 1.5rem;
  }

  .book-hero__rating-block {
    grid-template-columns: 1fr;
    padding: 1.125rem 1.25rem;
  }

  .book-hero__lists-shelves {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .book-activity {
    grid-template-columns: 1fr;
  }

  .book-hero__actions .btn {
    width: 100%;
  }
}

/* Libby return prompt */
body.modal-open {
  overflow: hidden;
}

/* Return prompt layout — shell in components.css */

.return-prompt__eyebrow {
  font-family: var(--shelf-font-data);
  font-size: var(--shelf-text-xs);
  font-weight: var(--shelf-weight-medium);
  letter-spacing: var(--shelf-tracking-caps);
  text-transform: uppercase;
  color: var(--shelf-color-libby);
  margin-bottom: var(--shelf-space-2);
}

.return-prompt__book {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.return-prompt__cover,
.return-prompt__book .book-cover-wrap {
  width: 64px;
  height: 96px;
  flex-shrink: 0;
}

.return-prompt__meta h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}

.return-prompt__meta p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.return-prompt__stat {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--color-libby);
}

.return-prompt__actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.return-prompt__actions .btn {
  width: 100%;
}

/* Rate queue + confirmation flow */
.rate-queue {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rate-queue__header {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}

.rate-queue__header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.rate-queue__header p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 36rem;
  margin: 0;
}

.rate-queue__list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.rate-queue__item {
  display: flex;
  gap: 1rem;
  align-items: center;
  width: 100%;
  padding: 0.875rem 1rem;
  text-align: left;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  font-family: inherit;
  color: inherit;
}

.rate-queue__item:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.rate-queue__item--active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(194, 59, 51, 0.25);
  background: var(--color-accent-soft);
}

.rate-queue__item--highlighted {
  animation: rateQueueHighlight 1.8s ease;
}

@keyframes rateQueueHighlight {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(194, 59, 51, 0.25);
  }

  35% {
    box-shadow: 0 0 0 3px rgba(194, 59, 51, 0.35);
  }
}

.rate-queue__item--new {
  border-color: rgba(0, 200, 150, 0.25);
}

.rate-entry--from-nav {
  animation: rateEntryHighlight 1.2s ease;
}

@keyframes rateEntryHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(194, 59, 51, 0);
  }

  40% {
    box-shadow: 0 0 0 3px rgba(194, 59, 51, 0.2);
  }

  100% {
    box-shadow: none;
  }
}

.rate-queue__cover,
.rate-queue__item .book-cover-wrap {
  width: 48px;
  height: 72px;
  flex-shrink: 0;
}

.rate-queue__body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.rate-queue__title {
  font-size: 0.9375rem;
  font-weight: 700;
}

.rate-queue__meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.rate-queue__badge {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--color-libby-soft);
  color: var(--color-libby);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rate-compose {
  margin-bottom: 0;
}

.rate-confirm {
  margin-bottom: 1.5rem;
}

.rate-confirm__card {
  padding: 1.5rem;
  background: var(--color-surface-elevated);
  border: 1px solid rgba(0, 200, 150, 0.2);
  border-radius: var(--radius-lg);
}

.rate-confirm__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-libby);
  margin-bottom: 0.375rem;
}

.rate-confirm__card h2 {
  font-size: 1.25rem;
  font-weight: var(--shelf-weight-bold);
  margin-bottom: 0.375rem;
}

.rate-confirm__card > p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.rate-confirm__preview {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.rate-confirm__cover,
.rate-confirm__preview .book-cover-wrap {
  width: 64px;
  height: 96px;
  flex-shrink: 0;
}

.rate-confirm__body h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}

.rate-confirm__body p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
}

.rate-confirm__review {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-top: 0.5rem;
}

.rate-confirm__review--empty {
  font-style: italic;
  color: var(--color-text-subtle);
}

.rate-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.rate-entry--active {
  border-color: rgba(255, 128, 0, 0.2);
}

/* Onboarding flow */
.onboarding-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 184, 150, 0.35), transparent),
    var(--color-bg);
}

.onboarding {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.onboarding__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.onboarding__brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-text);
}

.onboarding__step-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0;
}

.onboarding__progress {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.onboarding__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.onboarding__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-border-strong);
  transition: transform 0.2s, background 0.2s;
}

.onboarding__dot--current {
  background: var(--color-accent);
  transform: scale(1.25);
}

.onboarding__dot--done {
  background: var(--color-libby);
}

.onboarding__progress-track {
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.onboarding__progress-fill {
  height: 100%;
  width: 16.66%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-libby));
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}

.onboarding__panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.375rem 1.625rem;
}

.onboarding__panel #onboardingStepContent {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.onboarding-step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
  flex: 1;
  justify-content: center;
}

.onboarding-step--account,
.onboarding-step--libby {
  text-align: left;
}

.onboarding-step__eyebrow {
  align-self: center;
}

.onboarding-step--account .onboarding-step__eyebrow,
.onboarding-step--libby .onboarding-step__eyebrow {
  align-self: flex-start;
}

.onboarding-step__icon {
  font-size: 2.75rem;
  line-height: 1;
  margin: 0.25rem 0;
}

.onboarding-step__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.125rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
}

.onboarding-step__accent {
  color: var(--color-accent);
  font-style: italic;
}

.onboarding-step__lead {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 28rem;
  margin: 0 auto;
}

.onboarding-step--account .onboarding-step__lead,
.onboarding-step--libby .onboarding-step__lead {
  margin: 0;
}

.onboarding-step__note {
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
  line-height: 1.5;
}

.onboarding-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.375rem;
  max-width: 14rem;
  margin: 0 auto 0.5rem;
}

.onboarding-mosaic__cover,
.onboarding-mosaic__item .book-cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 2px 4px 4px 2px;
  box-shadow: var(--cover-shadow);
}

.onboarding__footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.onboarding__footer.hidden {
  display: none;
}

.onboarding__footer .btn--primary {
  flex: 1;
  max-width: 14rem;
  margin-left: auto;
}

.onboarding-account {
  margin-top: 0.25rem;
}

.onboarding-libby {
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--color-shelf-paper);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
}

.onboarding-libby__library-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.onboarding-libby__library-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.onboarding-libby__permissions {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.onboarding-libby__permissions li::before {
  content: "✓ ";
  color: var(--color-libby);
  font-weight: 700;
}

.onboarding-libby__demo {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  margin-bottom: 1rem;
}

.onboarding-libby #onboardingLibbyConsent {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.onboarding-libby__sync-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.onboarding-libby__sync-sub {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.onboarding-step--libby .libby-connect__steps {
  margin-bottom: 1rem;
}

/* Shelf API + auth states */
.flow-alert__detail {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  opacity: 0.9;
}

.shelf-state {
  padding: 1.5rem;
  text-align: center;
  border-radius: var(--radius-md);
}

.shelf-state__message {
  margin: 0.75rem 0 0;
  color: var(--color-text);
  font-size: 0.9375rem;
}

.shelf-state__detail {
  margin: 0.35rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.shelf-state__spinner {
  width: 2rem;
  height: 2rem;
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--color-accent, #c9a86c);
  border-radius: 50%;
  animation: shelfSpin 0.8s linear infinite;
}

@keyframes shelfSpin {
  to {
    transform: rotate(360deg);
  }
}

.shelf-state__retry {
  margin-top: 0.75rem;
}

.shelf-state--page {
  min-height: min(52vh, 26rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin: 1.5rem 0;
  padding: 2.5rem 1.5rem;
}

.shelf-state--page.shelf-state--loading {
  background: var(--shelf-color-paper-50, rgba(255, 252, 245, 0.92));
  border: var(--shelf-border-paper, 1px dashed rgba(60, 40, 28, 0.18));
  border-radius: var(--shelf-radius-sm, 4px);
  box-shadow: var(--shelf-shadow-paper-rest, none);
}

.shelf-state--page .shelf-state__message {
  font-family: var(--shelf-font-display, Georgia, serif);
  font-size: 1.125rem;
  font-weight: var(--shelf-weight-semibold, 600);
  color: var(--color-text, #2a2018);
}

.shelf-state--page .shelf-state__detail {
  max-width: 22rem;
  line-height: 1.5;
}

.search-catalog--fetching .search-catalog__body::after,
.books-catalog--fetching .books-catalog__ledger-body::after {
  content: "Still searching Open Library…";
  display: block;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  font-family: var(--shelf-font-data, monospace);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--shelf-color-text-subtle, rgba(42, 32, 24, 0.55));
  border-top: 1px dashed var(--col-rule, rgba(42, 32, 24, 0.12));
}

.shelf-auth-boot {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: rgba(10, 14, 12, 0.72);
  backdrop-filter: blur(4px);
}

.shelf-auth-boot__card {
  max-width: 22rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.shelf-auth-boot__text {
  margin: 0.75rem 0 0.25rem;
  font-weight: 600;
}

.shelf-auth-boot__hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.shelf-auth-booting {
  overflow: hidden;
}

.shelf-toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shelf-toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  animation: shelfToastIn 0.25s ease;
}

.shelf-toast--success {
  border-color: rgba(72, 160, 110, 0.35);
}

.shelf-toast--error {
  border-color: rgba(200, 90, 90, 0.35);
}

.shelf-toast--hide {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes shelfToastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.search-status {
  margin-bottom: 1rem;
}

.search-status.hidden {
  display: none;
}

.search-results__source {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.book-cover-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.03) 8%,
    rgba(255, 255, 255, 0.1) 18%,
    rgba(255, 255, 255, 0.03) 33%
  );
  background-size: 200% 100%;
  animation: coverShimmer 1.4s ease infinite;
}

.book-cover-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem;
  text-align: center;
  background: var(--cover-fallback, var(--color-surface-elevated));
}

.book-cover-fallback__initials {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(0.875rem, 22%, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.book-cover-fallback__label {
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
}

.book-cover-wrap--loading .book-cover-fallback {
  opacity: 0.45;
}

.book-cover-wrap--error .book-cover-fallback {
  opacity: 1;
}

.book-cover-wrap:not(.book-cover-wrap--loading):not(.book-cover-wrap--error) .book-cover-fallback {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.book-cover-wrap .book-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover-wrap--error .book-cover-skeleton,
.book-cover-wrap:not(.book-cover-wrap--loading) .book-cover-skeleton {
  display: none;
}

.book-cover--hidden {
  opacity: 0;
}

.book-cover-wrap:not(.book-cover-wrap--loading):not(.book-cover-wrap--error) .book-cover:not(.book-cover--hidden) {
  opacity: 1;
}

.book-cover-wrap__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.2rem 0.35rem;
  font-size: 0.55rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.book-cover-wrap--loading .book-cover-wrap__hint {
  opacity: 1;
}

@keyframes coverShimmer {
  to {
    background-position-x: -200%;
  }
}

.btn--loading {
  opacity: 0.85;
  cursor: wait;
}

/* Email confirmation wait */
.main--narrow {
  max-width: var(--shelf-content-narrow);
  margin: 0 auto;
}

.check-email,
.auth-callback {
  text-align: center;
}

.check-email__stamp {
  margin-bottom: var(--shelf-space-4);
}

.check-email__title {
  font-family: var(--shelf-font-display);
  font-size: var(--shelf-text-2xl);
  font-weight: var(--shelf-weight-semibold);
  margin-bottom: var(--shelf-space-3);
}

.check-email__lead {
  font-size: var(--shelf-text-base);
  color: var(--shelf-color-text-muted);
  line-height: var(--shelf-leading-normal);
  margin-bottom: var(--shelf-space-5);
}

.check-email__lead strong {
  color: var(--shelf-color-text);
  font-weight: var(--shelf-weight-semibold);
}

.check-email__steps {
  text-align: left;
  margin: 0 auto var(--shelf-space-6);
  padding-left: var(--shelf-space-6);
  max-width: 22rem;
  font-size: var(--shelf-text-base);
  color: var(--shelf-color-text-muted);
  line-height: var(--shelf-leading-relaxed);
}

.check-email__steps li + li {
  margin-top: var(--shelf-space-2);
}

.check-email__actions {
  display: flex;
  flex-direction: column;
  gap: var(--shelf-space-3);
  align-items: stretch;
  margin-bottom: var(--shelf-space-4);
}

.check-email__footer {
  margin-top: var(--shelf-space-2);
}

.auth-callback .shelf-state {
  padding: var(--shelf-space-8) var(--shelf-space-4);
}
