/* ===== LIBRARY PAGE ===== */
/* This stylesheet is intentionally independent from landing.css. */

.intro-final-ornament {
  display: block;
  width: clamp(38px, 4vw, 54px);
  height: auto;
  margin: clamp(28px, 5vh, 42px) auto 0;
  filter: none;
  opacity: 0.92;
}

.intro-footer {
  box-sizing: border-box;
  --intro-footer-edge-gap: clamp(34px, 5vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(32px, 7vw, 120px);
  margin-top: 0;
  padding: 0 18px;
  color: #1a1a1a;
  text-align: center;
  background: transparent;
  border-top: 0;
  font-size: clamp(14px, 1.2vw, 19px);
  font-weight: 400;
  line-height: 1.35;
}

.intro-footer p {
  margin: 0;
  padding-left: var(--intro-footer-edge-gap, 0);
  color: #777a80;
  font-size: inherit;
  white-space: nowrap;
}

.intro-footer-legal {
  flex: 1;
  margin-top: 0;
  padding-right: var(--intro-footer-edge-gap, clamp(34px, 5vw, 68px));
  color: #777a80;
}

.intro-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px clamp(34px, 5vw, 68px);
}

.intro-footer a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  transform-origin: center;
  transition: color 0.18s ease, transform 0.18s ease;
}

.intro-footer a:hover,
.intro-footer a:focus-visible {
  color: #f2f2f2;
  text-decoration: none;
  transform: scale(1.12);
}

@media (max-width: 760px) {
  .intro-final-ornament {
    width: 38px;
    margin-top: 68px;
  }

  .intro-footer {
    flex-direction: column;
    gap: 14px;
    font-size: 13px;
    padding: 0 14px;
  }

  .intro-footer p {
    margin-bottom: 0;
    padding-left: 0;
  }

  .intro-footer-legal {
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .library-content-transition,
  .library-shelf-panel.is-active,
  .library-saved-item.is-entering,
  .library-sigil-item.is-entering,
  .library-user-guide-content.is-fading-in,
  .library-user-guide-mobile-panel,
  .library-user-guide-faq-answer {
    opacity: 1;
    animation: none;
    transform: none;
    transition: none;
  }
}

@keyframes intro-fade-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes library-page-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
/* ===== BASE ===== */
body.landing {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.88), rgba(242, 239, 233, 0.92) 38%, #f2f0eb 100%);
  font-family: 'EB Garamond', serif;
  color: #111;
}

/* ===== CONTAINER ===== */
.landing .container {
  text-align: center;
  padding: 6px 12px 57px;
  animation: fadeIn 0.9s ease;
}

/* ===== HERO ===== */
.landing .hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.landing .title-box {
  position: relative;
  width: min(760px, calc(100vw - 48px));
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
}

.landing .logo {
  position: relative;
  z-index: 2;
  font-size: clamp(42px, 7.2vw, 76px);
  letter-spacing: 0.12em;
  font-weight: 400;
  line-height: 0.98;
  margin: 0;
  color: #161514;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(40px);
}

.landing .filigree {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, 10%);
  width: min(430px, 62vw);
  opacity: 0.16;
  display: block;
  pointer-events: none;
  user-select: none;
}

.landing .hero-divider {
  width: min(470px, calc(100vw - 110px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 10px;
}

.landing .hero-divider-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(39, 35, 28, 0.14), rgba(39, 35, 28, 0.7), rgba(39, 35, 28, 0.14));
}

.landing .hero-divider-diamond {
  width: 6px;
  height: 6px;
  border: 1px solid rgba(39, 35, 28, 0.72);
  background: #111;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.landing .tagline-box {
  margin-top: 10px;
}

.landing .tagline {
  display: inline-block;
  padding: 0;
  background: transparent;
  font-size: clamp(16px, 2.5vw, 22px);
  letter-spacing: 0.07em;
  color: rgba(24, 21, 18, 0.95);
}

.landing .hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  margin-top: 18px;
  padding: 10px 26px;
  background: linear-gradient(180deg, #4a4a4a 0%, #343434 100%);
  color: #f4efe7;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.08em;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 6px 14px rgba(0, 0, 0, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.landing .hero-cta::before,
.landing .hero-cta::after {
  content: none;
}

.landing .hero-cta span {
  position: relative;
  z-index: 1;
}

.landing .hero-cta i {
  display: none;
}

.landing .hero-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #535353 0%, #3a3a3a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 16px rgba(0, 0, 0, 0.12);
}

/* ===== NAV ===== */
.landing .nav {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 29px;
  font-size: 16px;
  flex-wrap: wrap;
  padding: 0 5px;
}

.landing .nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: rgba(17, 17, 17, 0.84);
  line-height: 1;
  padding: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.landing .nav a:hover {
  opacity: 0.65;
  transform: translateY(-1px);
  color: #111;
}

/* ===== LIBRARY GRID ===== */
.landing .library {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: 44px;
  row-gap: 34px;
  max-width: min(1120px, calc(100vw - 120px));
  margin-left: auto;
  margin-right: auto;
  align-items: start;
}

/* ===== BOOK CARD ===== */
.landing .book-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease;
  position: relative;
  width: 75%;
  justify-self: center;
}

.landing .book-rect {
  aspect-ratio: 3 / 4;
  border: 1.5px solid #111;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.landing .book-card:hover {
  transform: translateY(-5px);
}

.landing .book-card:hover .book-rect {
  background: rgba(0, 0, 0, 0.04);
}

.landing .book-cover-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  border: none;
  overflow: hidden;
  background: #ddd;
  box-shadow:
    8px 10px 0 rgba(0, 0, 0, 0.05),
    8px 12px 12px rgba(0, 0, 0, 0.18),
    3px 6px 6px rgba(0, 0, 0, 0.11),
    12px 0 14px rgba(255, 255, 255, 0.20) inset,
    -6px 0 10px rgba(0, 0, 0, 0.08) inset;
}

.landing .book-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 12, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 3;
}

.landing .book-loading-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.52);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.12);
  animation: landingSpin 0.75s linear infinite;
}

.landing .book-card.loading {
  pointer-events: none;
}

.landing .book-card.loading .book-loading-overlay {
  opacity: 1;
}

.landing .book-card.loading .book-cover img,
.landing .book-card.loading .book-title {
  filter: saturate(0.9) brightness(0.9);
}

.landing .book-card:hover .book-cover,
.landing .book-card:hover .book-cover-wrap {
  box-shadow:
    9px 12px 0 rgba(0, 0, 0, 0.06),
    9px 14px 14px rgba(0, 0, 0, 0.21),
    4px 7px 7px rgba(0, 0, 0, 0.13),
    12px 0 14px rgba(255, 255, 255, 0.22) inset,
    -6px 0 10px rgba(0, 0, 0, 0.09) inset;
}

.landing .book-cover {
  --book-title-bottom: clamp(38px, 4vw, 56px);
  --book-title-author-gap: clamp(6px, 0.65vw, 9px);
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #ddd;
  box-shadow:
    8px 10px 0 rgba(0, 0, 0, 0.05),
    8px 12px 12px rgba(0, 0, 0, 0.18),
    3px 6px 6px rgba(0, 0, 0, 0.11),
    12px 0 14px rgba(255, 255, 255, 0.20) inset,
    -6px 0 10px rgba(0, 0, 0, 0.08) inset;
}

.landing .book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.landing .book-card[data-book-tier="guest"] .book-cover::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: 55%;
  aspect-ratio: 1 / 1;
  background: url("https://storage.googleapis.com/narralogue-assets/fictions/static_common/misc/guest_banner.webp") top right / contain no-repeat;
  pointer-events: none;
}

.landing .book-title {
  line-height: 1.05;
}

.landing .book-title-overlay,
.landing .book-author-overlay {
  position: absolute;
  left: 0;
  right: 0;
  display: block;
  color: #f2f2f2;
  font-weight: 400;
  line-height: 1.08;
  text-align: left;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.82),
    0 0 12px rgba(0, 0, 0, 0.72);
  pointer-events: none;
  z-index: 2;
}

.landing .book-title-overlay {
  bottom: var(--book-title-bottom);
  padding: 0 clamp(12px, 1.5vw, 20px);
  font-size: clamp(18px, 1.8vw, 28px);
}

.landing .book-author-overlay {
  top: calc(100% - var(--book-title-bottom) + var(--book-title-author-gap));
  bottom: auto;
  padding: 0 clamp(12px, 1.5vw, 20px);
  font-size: clamp(12px, 1.1vw, 17px);
}

.landing .book-meta {
  margin-top: 7px;
  font-size: 13px;
  opacity: 0.75;
}

.landing .book-year {
  display: block;
  margin-top: 7px;
  font-size: calc(13px + 2pt);
  opacity: 0.75;
}

.landing .book-tone {
  display: block;
  margin-top: 4px;
  font-size: calc(10px + 2pt);
  opacity: 0.78;
}

.landing.library-page .book-progress {
  display: block;
  margin-top: 5px;
  color: rgba(214, 188, 130, 0.88);
  font-size: 13px;
  line-height: 1.25;
}

.landing.library-page .book-overall-progress {
  display: block;
  margin-top: 12px;
  color: rgba(214, 188, 130, 0.82);
  font-size: 13px;
  line-height: 1.25;
}

/* ===== LIBRARY PAGE REDESIGN ===== */
body.landing.library-page {
  --intro-subtitle-size: clamp(16px, 1.75vw, 25px);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  background: #030407;
  font-family: 'EB Garamond', Georgia, serif;
  color: #f2f2f2;
}

@supports (min-height: 100dvh) {
  body.landing.library-page {
    min-height: 100dvh;
  }
}

.library-content-transition {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: library-page-fade-in 0.75s ease-out forwards;
}

.library-page .library-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 72px));
  margin: 0 auto;
  padding: clamp(52px, 7vh, 76px) 0 clamp(58px, 9vh, 96px);
}

.library-section-placeholder {
  margin: 0 auto clamp(34px, 5vh, 58px);
  text-align: center;
}

.library-section-placeholder h1 {
  margin: 0 0 10px;
  color: #f2f2f2;
  font-size: clamp(24px, 2.6vw, 40px);
  font-weight: 400;
  line-height: 1.08;
}

.library-placeholder-text {
  margin: 0;
  color: rgba(242, 242, 242, 0.76);
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.35;
}

.library-request-shell {
  width: min(760px, calc(100vw - 72px));
}

.library-page .library-request-shell {
  padding-bottom: 0;
}

.library-page-end-divider {
  display: block;
  flex: 0 0 auto;
  width: min(142px, 56%);
  height: auto;
  margin: clamp(48px, 7vh, 72px) auto clamp(44px, 7vh, 72px);
  opacity: 0.72;
}

.library-request-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 22px);
  margin: 0 auto clamp(28px, 4vh, 42px);
  text-align: center;
}

.library-request-heading img {
  display: block;
  width: clamp(94px, 10vw, 152px);
  height: auto;
  opacity: 0.9;
}

.library-request-heading h1 {
  margin: 0;
  color: #f2f2f2;
  font-size: clamp(24px, 2.6vw, 40px);
  font-weight: 400;
  line-height: 1.08;
  white-space: nowrap;
}

.library-request-panel {
  box-sizing: border-box;
  width: min(100%, 680px);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(26, 26, 29, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 46px rgba(0, 0, 0, 0.28);
}

.library-request-intro {
  box-sizing: border-box;
  width: min(100%, 680px);
  margin: 0 auto;
  color: rgba(242, 242, 242, 0.82);
  font-size: 17px;
  line-height: 1.4;
  text-align: left;
}

.library-request-divider {
  display: block;
  width: min(142px, 56%);
  height: auto;
  margin: clamp(27px, 4vh, 46px) auto clamp(22px, 3.2vh, 35px);
  opacity: 0.72;
}

.library-request-form {
  display: grid;
  gap: 21px;
}

.library-request-field {
  display: grid;
  gap: 7px;
}

.library-request-field label {
  color: rgba(242, 242, 242, 0.72);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.library-request-field-note,
.library-request-optional {
  color: rgba(242, 242, 242, 0.63);
  font-size: 0.88em;
  font-style: normal;
}

.library-request-field-note {
  margin: -3px 0 2px;
}

.library-request-field input,
.library-request-field select,
.library-request-field textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #f2f2f2;
  background: rgba(37, 37, 41, 0.92);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.03);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 17px;
  line-height: 1.25;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.library-request-field input,
.library-request-field select {
  height: 50px;
  min-height: 50px;
  padding: 10px 16px;
}

.library-request-field textarea {
  min-height: 240px;
  padding: 17px 18px;
  resize: vertical;
}

.library-request-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(242, 242, 242, 0.52) 50%),
    linear-gradient(135deg, rgba(242, 242, 242, 0.52) 50%, transparent 50%);
  background-position:
    calc(100% - 24px) 50%,
    calc(100% - 17px) 50%;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.library-request-field input:focus,
.library-request-field select:focus,
.library-request-field textarea:focus {
  border-color: rgba(112, 145, 100, 0.88);
  background-color: rgba(39, 40, 43, 0.96);
  box-shadow:
    0 0 0 2px rgba(82, 110, 75, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.library-request-actions {
  display: flex;
  justify-content: center;
  margin-top: 3px;
}

.library-request-submit-wrap.narralogue-button-frame {
  margin-top: 0;
}

.library-request-submit.narralogue-button-inner {
  min-width: 168px;
}

.library-request-submit:disabled {
  cursor: not-allowed;
  color: rgba(245, 235, 207, 0.72);
  background: linear-gradient(180deg, #5d635c 0%, #434840 45%, #30342f 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), inset 0 -8px 12px rgba(0, 0, 0, 0.25);
  opacity: 1;
}

.library-request-submit-wrap.is-disabled.narralogue-button-frame {
  background: linear-gradient(180deg, #aaa58f 0%, #77715d 50%, #aaa58f 100%);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.library-request-field input:disabled,
.library-request-field select:disabled,
.library-request-field textarea:disabled {
  cursor: not-allowed;
  color: rgba(244, 238, 224, 0.58);
  border-color: rgba(255, 255, 255, 0.08);
  background-color: rgba(37, 37, 41, 0.92);
}

.library-request-status {
  margin: 24px auto 0;
  color: rgba(242, 242, 242, 0.84);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.4;
  text-align: center;
}

.library-request-status.is-success {
  color: #d3e4bf;
}

.library-request-status.is-error {
  color: #f0b5a9;
}

.library-request-cooldown-note {
  max-width: 500px;
  margin: 14px auto 0;
  color: rgba(242, 242, 242, 0.65);
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.35;
  text-align: center;
}

.library-account-shell {
  width: min(760px, calc(100vw - 72px));
}

.library-account-heading {
  margin-bottom: clamp(42px, 6vh, 64px);
}

.library-account-loaded-content[hidden] {
  display: block;
  visibility: hidden;
  opacity: 0;
}

.library-account-loaded-content:not([hidden]) {
  animation: library-account-content-fade-in 0.85s ease-out both;
}

@keyframes library-account-content-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .library-account-loaded-content:not([hidden]) {
    animation: none;
  }
}

.library-account-details {
  text-align: center;
}

.library-account-email,
.library-account-tier {
  margin: 0;
  color: rgba(242, 242, 242, 0.84);
  font-size: 17px;
  line-height: 1.4;
}

.library-account-email {
  color: #d5bc88;
  font-size: calc(17px + 4pt);
  overflow-wrap: anywhere;
}

.library-account-tier {
  margin-top: clamp(16px, 2.6vh, 24px);
}

.library-account-tier strong {
  color: #f2f2f2;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.library-account-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: clamp(34px, 5vh, 52px);
  padding-bottom: 70px;
}

.library-account-actions-divider {
  margin-top: clamp(27px, 4vh, 46px);
  margin-bottom: clamp(22px, 3.2vh, 35px);
}

.library-account-actions:has(.library-account-manage[hidden]) #libraryAccountActionsDivider {
  margin-top: 0;
}

.library-account-manage-wrap:has(.library-account-manage[hidden]) {
  display: none;
}

.library-account-manage-wrap.narralogue-button-frame {
  margin-top: 0;
}

.library-account-logout-wrap.narralogue-button-frame {
  --narralogue-button-width: 132px;
  --narralogue-button-height: 42px;
  --narralogue-button-font-size: 20px;
  margin-top: 0;
}

.library-account-manage-wrap .library-account-manage {
  margin: 0;
}

.library-account-logout:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.library-account-delete-wrap.narralogue-button-frame {
  --narralogue-button-width: 190px;
  --narralogue-button-height: 42px;
  --narralogue-button-font-size: 20px;
  margin-top: clamp(82px, 11vh, 112px);
  transform: translateY(50px);
}

.library-account-delete-wrap.narralogue-button-frame .library-account-delete.library-banner-cta-link.narralogue-button-inner {
  margin: 0;
  background: linear-gradient(
    180deg,
    #8f2034 0%,
    #681626 35%,
    #420d18 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    inset 0 -8px 12px rgba(0, 0, 0, 0.45);
}

.library-account-delete-wrap.narralogue-button-frame .library-account-delete.library-banner-cta-link.narralogue-button-inner:hover,
.library-account-delete-wrap.narralogue-button-frame .library-account-delete.library-banner-cta-link.narralogue-button-inner:focus-visible {
  background: linear-gradient(
    180deg,
    #aa2941 0%,
    #7b1b2d 40%,
    #51101e 100%
  );
}

body.library-account-modal-open {
  overflow: hidden;
}

.library-account-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.library-account-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

#libraryDeleteAccountOverlay {
  align-items: flex-start;
  padding-top: calc(clamp(68px, 9vh, 88px) + 10px);
}

.library-account-modal-backdrop {
  position: absolute;
  inset: 0;
}

.library-account-modal {
  position: relative;
  z-index: 1;
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid rgba(213, 188, 136, 0.42);
  border-radius: 12px;
  padding: clamp(27px, 5vw, 42px);
  background: #111;
  color: rgba(242, 242, 242, 0.86);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.58);
  font-family: "EB Garamond", Georgia, serif;
  transform: translateY(10px);
  transition: transform 240ms ease;
}

.library-account-delete-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - clamp(88px, 12vh, 116px));
  padding: 25px 30px 28px;
}

.library-account-modal.library-account-delete-modal h2 {
  margin: 0 24px 15px;
  font-size: clamp(25px, 3.5vw, 31px);
}

.library-account-modal-overlay.is-open .library-account-modal {
  transform: translateY(0);
}

.library-account-modal h2 {
  margin: 0 28px 20px;
  color: #f2f2f2;
  font-size: clamp(27px, 4.2vw, 35px);
  font-weight: 400;
  line-height: 1.08;
  text-align: center;
}

.library-account-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  padding: 3px 6px;
  background: transparent;
  color: rgba(242, 242, 242, 0.4);
  font: 20px/1 Arial, sans-serif;
  cursor: pointer;
  transition: color 160ms ease;
}

.library-account-modal-close:hover,
.library-account-modal-close:focus-visible {
  color: rgba(242, 242, 242, 0.7);
  outline: none;
}

.library-account-delete-warning p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.36;
  text-align: left;
}

.library-account-reauth-modal > p {
  margin: 0 0 13px;
  font-size: 17px;
  line-height: 1.42;
  text-align: center;
}

.library-account-delete-warning p:last-child {
  color: #efb2a8;
}

.library-account-confirm-label {
  display: block;
  margin: 17px 0 7px;
  color: #eee;
  font-size: 16px;
  text-align: left;
}

.library-account-confirm-input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(213, 188, 136, 0.48);
  border-radius: 7px;
  padding: 8px 11px;
  background: #080808;
  color: #f2f2f2;
  font: 18px/1.2 "EB Garamond", Georgia, serif;
}

.library-account-confirm-input:focus {
  border-color: #d5bc88;
  outline: 1px solid rgba(213, 188, 136, 0.36);
}

.library-account-delete-status {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: #efb2a8;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
}

.library-account-modal-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.library-account-modal-cancel-wrap.narralogue-button-frame {
  --narralogue-button-width: 118px;
  --narralogue-button-height: 40px;
  --narralogue-button-font-size: 18px;
}

.library-account-delete-confirm-wrap.narralogue-button-frame {
  --narralogue-button-width: 184px;
  --narralogue-button-height: 40px;
  --narralogue-button-font-size: 18px;
}

.library-account-delete-confirm-wrap.narralogue-button-frame .library-account-delete-confirm.narralogue-button-inner {
  background: linear-gradient(
    180deg,
    #8f2034 0%,
    #681626 35%,
    #420d18 100%
  );
}

.library-account-delete-confirm-wrap.narralogue-button-frame .library-account-delete-confirm.narralogue-button-inner:hover,
.library-account-delete-confirm-wrap.narralogue-button-frame .library-account-delete-confirm.narralogue-button-inner:focus-visible {
  background: linear-gradient(
    180deg,
    #aa2941 0%,
    #7b1b2d 40%,
    #51101e 100%
  );
}

.library-account-delete-confirm:disabled,
.library-account-modal button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.library-account-delete-confirm-wrap.narralogue-button-frame .library-account-delete-confirm.narralogue-button-inner:disabled {
  opacity: 1;
}

@media screen and (max-width: 520px) {
  #libraryDeleteAccountOverlay {
    padding-top: 74px;
  }

  .library-account-delete-modal {
    padding: 23px 18px 25px;
  }

  .library-account-modal-actions {
    flex-wrap: wrap;
  }
}

.library-account-reauth-modal {
  width: min(420px, calc(100vw - 32px));
}

.library-account-reauth-submit-wrap.narralogue-button-frame {
  --narralogue-button-width: 190px;
  --narralogue-button-height: 42px;
  --narralogue-button-font-size: 20px;
  display: flex;
  width: fit-content;
  margin: 22px auto 0;
}

.library-account-reauth-submit-wrap.narralogue-button-frame .library-account-reauth-submit.narralogue-button-inner {
  min-width: 0;
  margin: 0;
}

#libraryReauthGoogleSubmit {
  font-size: 16px;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .library-account-modal-overlay,
  .library-account-modal {
    transition: none;
  }
}

.library-page .library-user-guide-shell {
  width: 100%;
  margin: 0;
  padding: 0 0 clamp(58px, 9vh, 96px);
}

.library-user-guide-layout {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  min-height: clamp(480px, calc(100svh - 180px), 660px);
}

.landing.library-page.library-section-user-guide {
  height: 100svh;
  overflow: hidden;
}

.library-section-user-guide .library-top-menu {
  flex: 0 0 auto;
}

@supports (height: 100dvh) {
  .landing.library-page.library-section-user-guide {
    height: 100dvh;
  }
}

.library-section-user-guide .library-content-transition {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.library-section-user-guide .library-user-guide-shell {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding-bottom: 0;
}

.library-section-user-guide .library-user-guide-layout {
  min-height: 0;
  height: 100%;
  margin-top: 0;
}

.library-section-user-guide .library-user-guide-nav {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.library-section-user-guide .library-user-guide-content {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: auto;
  scrollbar-color: #9a9a9a #202020;
}

.library-section-user-guide .library-user-guide-content::-webkit-scrollbar {
  width: 17px;
}

.library-section-user-guide .library-user-guide-content::-webkit-scrollbar-track {
  background: #202020;
}

.library-section-user-guide .library-user-guide-content::-webkit-scrollbar-thumb {
  background: #9a9a9a;
  border-radius: 999px;
  border: 3px solid #202020;
}

.library-section-user-guide .library-user-guide-content::-webkit-scrollbar-button {
  background: #202020;
}

.landing.library-page.library-section-user-guide > .intro-footer {
  display: none;
}

.library-user-guide-nav {
  --library-user-guide-indicator-y: 0px;
  --library-user-guide-indicator-height: 0px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 50px;
  min-height: inherit;
  padding: clamp(48px, 8vh, 66px) 0 clamp(28px, 5vh, 42px);
  border-right: 1px solid #121418;
  background: #030407;
}

.library-user-guide-nav::after {
  content: "";
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: rgba(242, 242, 242, 0.72);
}

.library-user-guide-nav-indicator {
  display: none;
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: var(--library-user-guide-indicator-height);
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  opacity: 0;
  pointer-events: none;
  transform: translateY(var(--library-user-guide-indicator-y));
  transition:
    transform 280ms ease,
    height 280ms ease,
    opacity 180ms ease;
}

.library-user-guide-nav.has-active-indicator .library-user-guide-nav-indicator {
  opacity: 0;
}

.library-user-guide-nav-item {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0 clamp(22px, 3vw, 36px);
  color: #777a80;
  font-size: calc(clamp(21px, calc(1.45vw + 3pt), 25px) - 2pt);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.library-user-guide-nav-item::after {
  content: "";
  display: none;
  position: absolute;
  top: 50%;
  right: 0;
  width: 3px;
  height: 64px;
  background: transparent;
  transform: translate(1px, -50%);
}

.library-user-guide-nav-item:hover,
.library-user-guide-nav-item:focus-visible {
  color: #f2f2f2;
  transform: translateY(-1.6px) scale(1.04);
}

.library-user-guide-nav-item.is-active {
  color: #b89654;
  transform: translateY(-1.6px);
}

.library-user-guide-nav-item:focus-visible {
  outline: 1px solid rgba(242, 242, 242, 0.58);
  outline-offset: 6px;
}

.library-user-guide-nav-item.is-active::after {
  background: transparent;
}

.library-user-guide-content {
  min-width: 0;
  padding: 0;
  scroll-margin-top: clamp(78px, 5.55vw, 108px);
}

.library-user-guide-content.is-fading-in {
  animation: library-user-guide-pane-fade-in 360ms ease-out both;
}

@keyframes library-user-guide-pane-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.library-user-guide-hero {
  position: relative;
  width: 70%;
  min-height: clamp(210px, 26.25vw, 364px);
  margin: clamp(28px, 5vh, 54px) auto 0;
  overflow: hidden;
  background: #030407;
  aspect-ratio: 16 / 7;
}

.library-user-guide-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 4, 7, 0.7) 0%, rgba(3, 4, 7, 0.2) 38%, rgba(3, 4, 7, 0.08) 100%),
    linear-gradient(0deg, rgba(3, 4, 7, 0.55) 0%, rgba(3, 4, 7, 0) 48%);
  pointer-events: none;
}

.library-user-guide-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.library-user-guide-hero-copy {
  position: absolute;
  z-index: 1;
  left: calc(clamp(34px, 5vw, 72px) - 50px);
  bottom: calc(clamp(34px, 6vh, 74px) + 100px);
  width: min(520px, calc(100% - 68px));
}

.library-user-guide-hero-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(29px, 2.4vw, 46px);
  font-weight: 400;
  line-height: 1.18;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.library-user-guide-getting-started-hero {
  width: 100%;
  min-height: clamp(280px, 31vw, 430px);
  margin: 0;
  aspect-ratio: 16 / 7;
}

.library-user-guide-getting-started-hero .library-user-guide-hero-image {
  object-fit: cover;
  border-radius: 0;
}

.library-user-guide-getting-started-hero-copy {
  left: clamp(24px, 4vw, 64px);
  top: 50%;
  bottom: auto;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100% - 48px);
  padding: clamp(18px, 2.3vw, 30px) clamp(20px, 2.8vw, 36px);
  border: 0;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  box-shadow: none;
  backdrop-filter: none;
  transform: translateY(calc(-50% + 120px));
}

.library-user-guide-getting-started-hero-copy .library-user-guide-hero-title {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.library-user-guide-article {
  width: 70%;
  margin: clamp(18px, 3vh, 30px) auto 0;
}

.library-user-guide-reading-article {
  margin-top: clamp(36px, 7vh, 72px);
}

.library-user-guide-reading-intro {
  margin-bottom: clamp(34px, 6vh, 58px);
}

.library-user-guide-empty-pane {
  margin-top: clamp(58px, 10vh, 96px);
}

.library-user-guide-section + .library-user-guide-section {
  margin-top: clamp(34px, 6vh, 58px);
}

.library-user-guide-filigree {
  display: block;
  width: min(30%, 186px);
  height: auto;
  margin-right: auto;
  margin-left: auto;
  object-fit: contain;
  opacity: 0.86;
  filter: grayscale(1) brightness(2.2) contrast(0.85);
}

.library-user-guide-filigree-top {
  margin-bottom: clamp(18px, 3vh, 30px);
}

.library-user-guide-filigree-bottom {
  margin-top: clamp(24px, 4vh, 38px);
}

.library-user-guide-content h2 {
  margin: 0 0 18px;
  color: rgba(242, 242, 242, 0.94);
  font-size: clamp(28px, 2.6vw, 42px);
  font-weight: 400;
  line-height: 1.12;
}

.library-user-guide-reading-article h2 {
  text-align: center;
}

.library-user-guide-content p {
  margin: 0 0 10px;
  color: rgba(242, 242, 242, 0.74);
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
}

.library-user-guide-content p:last-child {
  margin-bottom: 0;
}

.library-user-guide-video {
  display: block;
  width: 100%;
  height: auto;
  margin: clamp(24px, 4vh, 40px) auto 0;
  background: #030407;
}

.library-user-guide-video + .library-user-guide-section {
  margin-top: clamp(36px, 6vh, 58px);
}

.library-user-guide-video + .library-user-guide-topic-break {
  margin-top: clamp(54px, 9vh, 88px);
}

.library-user-guide-topic-divider {
  display: block;
  width: min(42%, 260px);
  height: auto;
  margin: clamp(34px, 6vh, 58px) auto 0;
  object-fit: contain;
  opacity: 0.78;
  filter: grayscale(1) brightness(1.85) contrast(0.9);
}

.library-user-guide-topic-divider + .library-user-guide-topic-break {
  margin-top: clamp(38px, 6.5vh, 64px);
}

.library-user-guide-topic-divider-top {
  margin-top: 0;
}

.library-user-guide-topic-divider-top + .library-user-guide-section {
  margin-top: clamp(30px, 5vh, 48px);
}

.library-user-guide-faq-hero {
  width: 100%;
  margin: 0;
}

.library-user-guide-faq-hero::after {
  display: none;
}

.library-user-guide-faq-hero .library-user-guide-hero-image {
  object-fit: cover;
  border-radius: 0;
}

.library-user-guide-faq-hero-copy {
  left: clamp(24px, 4vw, 64px);
  top: 50%;
  bottom: auto;
  box-sizing: border-box;
  width: min(520px, calc(100% - 48px));
  padding: clamp(18px, 2.3vw, 30px) clamp(20px, 2.8vw, 36px);
  border: 0;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  box-shadow: none;
  backdrop-filter: none;
  transform: translateY(calc(-50% + 120px));
}

.library-user-guide-faq-hero-copy .library-user-guide-hero-title {
  margin-bottom: clamp(8px, 1.3vh, 14px);
}

.library-user-guide-content .library-user-guide-faq-hero-text,
.library-user-guide-faq-hero-text {
  margin: 0;
  color: rgba(242, 242, 242, 0.82);
  font-size: clamp(19px, 1.45vw, 24px);
  line-height: 1.3;
  text-align: left;
}

.library-user-guide-faq-list {
  width: 70%;
  margin: clamp(34px, 6vh, 58px) auto 0;
}

.library-user-guide-faq-item {
  border-top: 1px solid #121418;
}

.library-user-guide-faq-item:last-child {
  border-bottom: 1px solid #121418;
}

.library-user-guide-content .library-user-guide-faq-heading,
.library-user-guide-faq-heading {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.library-user-guide-faq-trigger {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: clamp(18px, 2.8vh, 26px) 4px;
  border: 0;
  color: #777a80;
  background: transparent;
  cursor: pointer;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(19px, 1.45vw, 24px);
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  letter-spacing: 0;
  transition: color 200ms ease;
}

.library-user-guide-faq-trigger::before {
  content: "+";
  color: currentColor;
  font-size: 1.25em;
  line-height: 1;
  text-align: center;
}

.library-user-guide-faq-trigger[aria-expanded="true"]::before {
  content: "\2212";
}

.library-user-guide-faq-trigger:hover,
.library-user-guide-faq-trigger:focus-visible,
.library-user-guide-faq-trigger:active {
  color: #f2f2f2;
}

.library-user-guide-faq-trigger:focus-visible {
  outline: 1px solid rgba(242, 242, 242, 0.58);
  outline-offset: -4px;
}

.library-user-guide-faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 240ms ease,
    opacity 220ms ease;
}

.library-user-guide-faq-answer[hidden] {
  display: none;
}

.library-user-guide-faq-answer.is-open {
  opacity: 1;
}

.library-user-guide-faq-answer-inner {
  padding: 0 4px clamp(26px, 4vh, 40px) 42px;
}

.library-user-guide-faq-answer p {
  margin: 0 0 10px;
  color: rgba(242, 242, 242, 0.74);
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
}

.library-user-guide-faq-answer p:last-child {
  margin-bottom: 0;
}

.library-user-guide-mobile-accordion {
  display: none;
}

.library-user-guide-mobile-panel[hidden] {
  display: none;
}

.landing.library-page.library-section-user-guide .library-user-guide-footer {
  --intro-footer-edge-gap: clamp(20px, 3vw, 44px);
  width: 100%;
  min-height: 0;
  margin: 150px auto 0;
  padding: 10px clamp(18px, 3vw, 42px) 12px;
  color: #f2f2f2;
  font-size: clamp(13px, 0.95vw, 15px);
  background:
    linear-gradient(90deg, rgba(3, 4, 7, 0.74) 0%, rgba(3, 4, 7, 0.24) 28%, rgba(3, 4, 7, 0) 50%, rgba(3, 4, 7, 0.24) 72%, rgba(3, 4, 7, 0.74) 100%),
    linear-gradient(180deg, rgba(43, 66, 82, 0.68) 0%, rgba(22, 34, 43, 0.46) 58%, rgba(3, 4, 7, 0) 100%),
    #030407;
  border-radius: 8px 8px 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -20px 30px rgba(3, 4, 7, 0.58),
    0 -8px 22px rgba(0, 0, 0, 0.16);
}

.landing.library-page.library-section-user-guide .library-user-guide-footer p {
  color: #777a80;
  font-size: calc(clamp(13px, 0.95vw, 15px) + 1pt);
}

.landing.library-page.library-section-user-guide .library-user-guide-footer .intro-footer-legal {
  color: #777a80;
  font-size: calc(clamp(13px, 0.95vw, 15px) + 1pt);
}

.landing.library-page.library-section-user-guide .library-user-guide-footer a:hover,
.landing.library-page.library-section-user-guide .library-user-guide-footer a:focus-visible {
  color: #f2f2f2;
}

.library-user-guide-mobile-footer {
  display: none;
}

.library-top-menu {
  --library-menu-icon-height: clamp(19.2px, 1.6vw, 26.4px);
  --library-menu-icon-stage-height: var(--library-menu-icon-height);
  --library-menu-icon-stage-width: 51.2px;
  --library-menu-item-width: 60.8px;
  --library-menu-icon-home-height: 32.56px;
  --library-menu-icon-discover-height: 32px;
  --library-menu-icon-my-shelf-height: 23.2px;
  --library-menu-icon-user-guide-height: 40px;
  --library-menu-icon-request-height: 36px;
  --library-menu-icon-notification-height: 32px;
  --library-menu-icon-support-height: 32px;
  --library-menu-patron-width: clamp(126px, 10.8vw, 206px);
  --library-menu-patron-height: 42px;
  --library-menu-patron-font-size: clamp(10px, calc(1.575vw - 4px), 19.8px);
  --library-menu-tier-badge-width: 136px;
  --library-menu-tier-badge-height: 68px;
  --library-menu-notification-circle-size: 49px;
  --library-menu-notification-icon-height: 24px;
  --library-menu-account-size: 50.4px;
  --library-menu-account-font-size: 29.7px;
  --library-menu-account-radius: 12.6px;
  --library-top-menu-visible-height: 71px;
  position: sticky;
  z-index: 50;
  top: 0;
  width: 100%;
  height: var(--library-top-menu-visible-height);
  overflow-x: auto;
  overflow-y: hidden;
  color: #777a80;
  background: #030407;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

@supports ((-webkit-backdrop-filter: blur(18px)) or (backdrop-filter: blur(18px))) {
  .library-top-menu {
    background: rgba(3, 4, 7, 0.72);
    -webkit-backdrop-filter: blur(18px) saturate(85%);
    backdrop-filter: blur(18px) saturate(85%);
  }
}

.library-top-menu::-webkit-scrollbar {
  height: 4px;
}

.library-top-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.library-top-menu-track {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: clamp(13.6px, 1.44vw, 27.2px);
  width: 100%;
  min-width: max-content;
  min-height: 88px;
  padding: 9.6px clamp(16px, 1.8vw, 32px) 8px;
}

.library-top-menu-logo {
  flex: 0 0 auto;
  display: block;
  width: clamp(180px, 12.56vw, 240px);
  transform: translateY(-12px);
}

.library-top-menu-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.library-mobile-menu-toggle,
.library-mobile-menu {
  display: none;
}

.library-mobile-menu-toggle {
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 0;
  color: #777a80;
  background: transparent;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.library-mobile-menu-toggle:hover,
.library-mobile-menu-toggle:focus-visible,
.library-mobile-menu-toggle[aria-expanded="true"] {
  color: #f2f2f2;
  transform: translateY(-1.6px);
}

.library-mobile-menu-toggle-line {
  display: block;
  width: 31px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.library-mobile-menu[hidden] {
  display: none;
}

@keyframes library-mobile-menu-glide {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes library-mobile-menu-glide-close {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.library-banner-carousel {
  position: relative;
  z-index: 1;
  width: 95%;
  aspect-ratio: 16 / 6;
  margin: 0 auto;
  overflow: hidden;
  background: #030407;
  touch-action: pan-y;
  user-select: none;
}

.library-banner-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.library-banner-slide {
  position: relative;
  height: 100%;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.library-banner-slide:not(.is-active) {
  position: absolute;
  inset: 0;
}

.library-banner-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.library-banner-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.library-banner-copy {
  position: absolute;
  z-index: 2;
  left: clamp(52px, 8.6vw, 132px);
  top: 50%;
  width: min(720px, 58vw);
  padding: clamp(18px, 2.6vw, 36px) clamp(24px, 4.2vw, 58px) clamp(18px, 2.6vw, 36px) 0;
  color: #f2f2f2;
  text-align: left;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(0, 0, 0, 0.72);
  transform: translateY(calc(-36% + 40px));
}

.library-banner-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 clamp(-42px, -3.4vw, -24px) 0 clamp(-42px, -3.4vw, -24px);
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

.library-banner-copy h2 {
  margin: 0 0 clamp(18px, 2vw, 28px);
  font-size: clamp(29.4px, 3.36vw, 50.4px);
  font-weight: 400;
  line-height: 0.98;
}

.library-banner-copy p {
  margin: 0;
  max-width: 690px;
  font-size: clamp(14px, 1.575vw, 23.8px);
  line-height: 1.26;
}

.library-banner-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-width: 0;
  margin-top: clamp(16px, 2vw, 24px);
  padding: 0 28px;
  border-radius: 999px;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(14px, 1.575vw, 23.8px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: #030407;
  background: #f2f2f2;
  border: 1px solid rgba(3, 4, 7, 0.18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  text-shadow: none;
}

.library-banner-cta-wrap.narralogue-button-frame {
  --narralogue-button-frame-padding: 1px;
  --narralogue-button-width: auto;
  --narralogue-button-height: 42px;
  --narralogue-button-font-size: clamp(17px, 1.24vw, 20px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(16px, 2vw, 24px);
  padding: var(--narralogue-button-frame-padding);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #d5bc88 0%,
    #b88c4b 20%,
    #8b6837 50%,
    #b88c4b 80%,
    #e4c995 100%
  );
  box-shadow:
    0 18px 24px rgba(0, 0, 0, 0.52),
    0 3px 12px rgba(222, 177, 92, 0.18),
    inset 0 2px 2px rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.25s ease;
  vertical-align: top;
}

.library-banner-cta-link.narralogue-button-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--narralogue-button-width);
  height: var(--narralogue-button-height);
  box-sizing: border-box;
  min-width: 0;
  padding: 0 24px;
  border: none;
  outline: none;
  border-radius: 999px;
  color: #f5ebcf;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--narralogue-button-font-size);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(
    180deg,
    #18483a 0%,
    #12362c 35%,
    #0d271f 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    inset 0 -8px 12px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.library-banner-cta-link.narralogue-button-inner:visited {
  color: #f5ebcf;
}

.library-banner-cta-link.narralogue-button-inner::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 40%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

.library-banner-cta-wrap.narralogue-button-frame:hover,
.library-banner-cta-wrap.narralogue-button-frame:focus-within {
  box-shadow:
    0 22px 34px rgba(0, 0, 0, 0.58),
    0 0 18px rgba(224, 183, 103, 0.26),
    0 4px 14px rgba(222, 177, 92, 0.2),
    inset 0 2px 2px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.library-banner-cta-link.narralogue-button-inner:hover,
.library-banner-cta-link.narralogue-button-inner:focus-visible {
  color: #f5ebcf;
  text-decoration: none;
  background: linear-gradient(
    180deg,
    #1d5545 0%,
    #154235 40%,
    #103027 100%
  );
}

.library-banner-cta-link.narralogue-button-inner:focus-visible {
  outline: 1px solid rgba(245, 235, 207, 0.72);
  outline-offset: -6px;
}

.library-banner-cta-link.narralogue-button-inner:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.55);
}

.library-banner-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(14px, 2vw, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateX(-50%);
}

.library-banner-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(242, 242, 242, 0.42);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.library-banner-dot:hover,
.library-banner-dot:focus-visible {
  background: rgba(242, 242, 242, 0.76);
  transform: scale(1.08);
}

.library-banner-dot.is-active {
  background: #f2f2f2;
}

.library-featured-divider {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 22px);
  margin: calc(clamp(34px, 5vh, 58px) + 15px) auto 0;
  color: #f2f2f2;
  text-align: center;
}

.library-featured-divider img {
  display: block;
  width: clamp(94px, 10vw, 152px);
  height: auto;
  opacity: 0.9;
}

.library-featured-divider h2 {
  margin: 0;
  font-size: clamp(14px, 1.575vw, 23.8px);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.library-discover-shell {
  padding-top: 40px;
}

.library-discover-divider {
  margin-top: 0;
  margin-bottom: clamp(52px, 7vh, 76px);
}

.library-featured-shelf {
  position: relative;
  z-index: 1;
  width: min(95%, 1440px);
  margin: clamp(30px, 4.4vh, 52px) auto 0;
  color: #f2f2f2;
}

.library-guest-shelf {
  margin-bottom: clamp(34px, 5vh, 58px);
}

.library-featured-shelf h2 {
  margin: 0 0 clamp(26px, 4vh, 44px);
  font-size: clamp(14px, 1.575vw, 23.8px);
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.library-featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.2vw, 34px);
  align-items: start;
}

.library-featured-shelf-divider {
  display: block;
  width: clamp(120px, 16vw, 240px);
  height: clamp(12px, 1.2vw, 18px);
  margin: clamp(30px, 4.4vh, 52px) auto 0;
  object-fit: contain;
  opacity: 0.9;
  filter: brightness(0) invert(95%);
}

.library-featured-item {
  min-width: 0;
  text-align: center;
}

.library-featured-grid .book-card,
.library-saved-grid .book-card,
.landing.library-page .library-featured-card {
  position: relative;
  display: block;
  width: 100%;
  justify-self: stretch;
  overflow: hidden;
  border-radius: 10px;
}

.library-featured-grid .book-cover,
.library-saved-grid .book-cover,
.library-featured-card .book-cover {
  --book-title-bottom: clamp(58px, 5.5vw, 86px);
  --book-title-author-gap: clamp(8px, 0.8vw, 12px);
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow:
    8px 12px 18px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(242, 242, 242, 0.08);
}

.library-featured-grid .book-cover img,
.library-saved-grid .book-cover img {
  border-radius: 10px;
}

.library-featured-grid .book-card:hover .book-cover,
.library-saved-grid .book-card:hover .book-cover,
.library-featured-card:hover .book-cover {
  box-shadow:
    10px 15px 22px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(242, 242, 242, 0.12);
}

.library-featured-grid .book-year {
  margin-top: clamp(12px, 1.4vw, 18px);
  font-size: calc(13px + 2pt);
}

.library-saved-grid .book-year {
  display: none;
}

.library-featured-grid .book-tone {
  max-width: 24em;
  margin-right: auto;
  margin-left: auto;
  font-size: calc(13px + 2pt);
  line-height: 1.35;
}

.library-saved-grid .book-tone {
  display: none;
}

.landing.library-page .library-saved-grid .book-progress {
  font-size: calc(13px + 1pt);
}

.landing.library-page .library-saved-grid .book-overall-progress {
  font-size: calc(13px + 1pt);
}

.library-featured-copy {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(20px, 2.2vw, 34px);
  padding: clamp(28px, 4.2vw, 62px) clamp(22px, 3.2vw, 48px) clamp(24px, 3.3vw, 50px);
  color: #f2f2f2;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.66) 0%,
    rgba(0, 0, 0, 0.42) 48%,
    rgba(0, 0, 0, 0) 100%
  );
  text-align: left;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.82),
    0 0 12px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.library-featured-title,
.library-featured-author {
  display: block;
  color: #f2f2f2;
  font-weight: 400;
  line-height: 1.08;
}

.library-featured-title {
  max-width: 9.5em;
  font-size: clamp(28px, 2.5vw, 42px);
}

.library-featured-author {
  font-size: clamp(17px, 1.55vw, 25px);
}

.library-featured-item .book-meta {
  margin-top: clamp(12px, 1.4vw, 18px);
}

.library-featured-item .book-meta {
  font-size: 13px;
}

.library-featured-item .book-tone {
  font-size: calc(13px + 2pt);
}

.library-featured-item .book-tone {
  max-width: 24em;
  margin-right: auto;
  margin-left: auto;
  line-height: 1.35;
}

.library-page .library-after-hero {
  opacity: 0;
  animation: intro-fade-rise 0.9s ease-out 0.18s forwards;
}

.library-top-menu-nav,
.library-top-menu-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: clamp(12px, 1.16vw, 22.4px);
}

.library-top-menu-actions {
  margin-left: auto;
  padding-right: 0;
  gap: clamp(12px, 1.2vw, 20px);
}

.library-menu-item {
  display: flex;
  flex: 0 0 var(--library-menu-item-width);
  width: var(--library-menu-item-width);
  min-width: var(--library-menu-item-width);
  max-width: var(--library-menu-item-width);
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4.8px;
  color: #777a80;
  font-size: clamp(12px, 1vw, 14.8px);
  line-height: 1;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.library-menu-item img {
  display: block;
  width: auto;
  height: var(--library-menu-icon-height);
  object-fit: contain;
  opacity: 0.74;
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.library-menu-icon-stage {
  display: flex;
  flex: 0 0 var(--library-menu-icon-stage-height);
  width: var(--library-menu-icon-stage-width);
  min-width: var(--library-menu-icon-stage-width);
  max-width: var(--library-menu-icon-stage-width);
  height: var(--library-menu-icon-stage-height);
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}

.library-menu-label {
  display: block;
  white-space: nowrap;
}

.library-menu-icon.library-menu-icon-home {
  height: var(--library-menu-icon-home-height);
}

.library-menu-icon.library-menu-icon-discover {
  height: var(--library-menu-icon-discover-height);
}

.library-menu-icon.library-menu-icon-my-shelf {
  height: var(--library-menu-icon-my-shelf-height);
}

.library-menu-icon.library-menu-icon-user-guide {
  height: var(--library-menu-icon-user-guide-height);
}

.library-menu-icon.library-menu-icon-request {
  height: var(--library-menu-icon-request-height);
}

.library-menu-icon.library-menu-icon-notification {
  height: var(--library-menu-icon-notification-height);
}

.library-menu-icon.library-menu-icon-support {
  height: var(--library-menu-icon-support-height);
}

.library-menu-item.active {
  color: #b89654;
  transform: translateY(-1.6px);
}

.library-menu-item:hover,
.library-menu-item:focus-visible,
.library-menu-patron:hover,
.library-menu-patron:focus-visible,
.library-menu-patron.active,
.library-menu-circle-action:hover,
.library-menu-circle-action:focus-visible,
.library-menu-account-button:hover,
.library-menu-account-button:focus-visible {
  color: #f2f2f2;
  transform: translateY(-1.6px);
}

.library-menu-item.active .library-menu-icon {
  filter: brightness(0) saturate(100%) invert(67%) sepia(20%) saturate(956%) hue-rotate(3deg) brightness(89%) contrast(88%);
  opacity: 1;
}

.library-menu-item:hover .library-menu-icon,
.library-menu-item:focus-visible .library-menu-icon {
  filter: brightness(0) invert(95%);
  opacity: 1;
}

.library-menu-patron {
  --library-menu-patron-frame-padding: 1px;
  position: relative;
  top: -10px;
  display: flex;
  flex: 0 0 var(--library-menu-patron-width);
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: var(--library-menu-patron-width);
  min-width: var(--library-menu-patron-width);
  height: var(--library-menu-patron-height);
  padding: var(--library-menu-patron-frame-padding);
  border-radius: 999px;
  color: #f5ebcf;
  background: linear-gradient(
    180deg,
    #d5bc88 0%,
    #b88c4b 20%,
    #8b6837 50%,
    #b88c4b 80%,
    #e4c995 100%
  );
  box-shadow:
    0 18px 24px rgba(0, 0, 0, 0.52),
    0 3px 12px rgba(222, 177, 92, 0.18),
    inset 0 2px 2px rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  font-size: var(--library-menu-patron-font-size);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.18s ease, transform 0.18s ease, box-shadow 0.25s ease;
}

.library-menu-patron::before {
  content: "";
  position: absolute;
  inset: var(--library-menu-patron-frame-padding);
  z-index: 0;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #18483a 0%,
    #12362c 35%,
    #0d271f 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    inset 0 -8px 12px rgba(0, 0, 0, 0.45);
  transition: background 0.25s ease;
}

.library-menu-patron::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(var(--library-menu-patron-frame-padding) + 7px);
  z-index: 1;
  height: 40%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

.library-menu-patron > span {
  position: relative;
  z-index: 2;
}

.library-menu-patron:hover,
.library-menu-patron:focus-visible,
.library-menu-patron.active {
  box-shadow:
    0 22px 34px rgba(0, 0, 0, 0.58),
    0 0 18px rgba(224, 183, 103, 0.26),
    0 4px 14px rgba(222, 177, 92, 0.2),
    inset 0 2px 2px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.library-menu-patron:hover::before,
.library-menu-patron:focus-visible::before,
.library-menu-patron.active::before {
  background: linear-gradient(
    180deg,
    #1d5545 0%,
    #154235 40%,
    #103027 100%
  );
}

.library-menu-patron-mark {
  display: inline-block;
  font-size: 1.08em;
  line-height: 1;
}

.library-menu-tier-badge {
  position: relative;
  top: -10px;
  display: flex;
  flex: 0 0 var(--library-menu-tier-badge-width);
  width: var(--library-menu-tier-badge-width);
  min-width: var(--library-menu-tier-badge-width);
  height: var(--library-menu-tier-badge-height);
  align-items: center;
  justify-content: center;
  overflow: visible;
  box-sizing: border-box;
  padding: 0 5px;
  color: #777a80;
  cursor: default;
  font-family: 'EB Garamond', Garamond, Georgia, serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  transition: color 0.18s ease;
}

.library-menu-tier-badge[hidden] {
  display: flex;
  visibility: hidden;
  opacity: 0;
}

.library-menu-tier-badge.is-adding-credit {
  transition:
    flex-basis 0.58s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.58s cubic-bezier(0.22, 1, 0.36, 1),
    min-width 0.58s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.18s ease;
}

.library-menu-usage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  width: 100%;
  gap: 6px;
}

.library-menu-tier-badge.is-adding-credit .library-menu-usage-list {
  transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
}

.library-menu-tier-badge[data-credit-count="1"] .library-menu-usage-list {
  grid-template-columns: minmax(0, 1fr);
}

.library-menu-tier-badge[data-credit-count="2"] {
  flex-basis: clamp(210px, 19vw, 272px);
  width: clamp(210px, 19vw, 272px);
  min-width: clamp(210px, 19vw, 272px);
}

.library-menu-usage-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.library-menu-tier-badge.is-adding-credit .library-menu-usage-card.is-top-up {
  animation: library-menu-top-up-credit-enter 0.58s 0.04s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes library-menu-top-up-credit-enter {
  from {
    opacity: 0;
    transform: translateX(28px);
  }

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

@media (prefers-reduced-motion: reduce) {
  .library-menu-tier-badge.is-adding-credit,
  .library-menu-tier-badge.is-adding-credit .library-menu-usage-list {
    transition: none;
  }

  .library-menu-tier-badge.is-adding-credit .library-menu-usage-card.is-top-up {
    opacity: 1;
    animation: none;
    transform: none;
  }
}

.library-menu-usage-label {
  overflow: hidden;
  color: #777a80;
  font-size: clamp(12px, 1vw, 14.8px);
  line-height: 1.05;
  text-align: center;
  text-transform: capitalize;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-menu-tier-badge[data-credit-count="2"] .library-menu-usage-progress {
  width: min(100%, 118px);
  margin-right: auto;
  margin-left: auto;
}

.library-menu-tier-badge[data-credit-count="2"] .library-menu-usage-list {
  transform: translateX(-20px);
}

.library-menu-usage-progress {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 25px;
  min-height: 25px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(20, 27, 31, 0.96), rgba(8, 13, 17, 0.98)) padding-box,
    linear-gradient(
      180deg,
      #d5bc88 0%,
      #b88c4b 20%,
      #8b6837 50%,
      #b88c4b 80%,
      #e4c995 100%
    ) border-box;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.5),
    0 1px 5px rgba(222, 177, 92, 0.16),
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -4px 6px rgba(0, 0, 0, 0.48);
}

.library-menu-usage-progress::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 2px;
  right: 7px;
  left: 7px;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.24),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

.library-menu-usage-progress-fill {
  display: block;
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8c672e, #b8873e);
  box-shadow:
    0 0 5px rgba(184, 135, 62, 0.42),
    inset 0 1px 1px rgba(255, 255, 255, 0.24),
    inset 0 -5px 7px rgba(70, 40, 9, 0.34);
  transition: width 0.25s ease;
}

.library-menu-usage-progress-percent {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7f3e8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.library-menu-usage-card.is-low-credit .library-menu-usage-progress-percent {
  right: 52px;
}

.library-menu-usage-top-up {
  position: absolute;
  right: 9px;
  bottom: 0;
  z-index: 4;
  height: 25px;
  margin: 0;
  padding: 0 3px;
  border: 0;
  border-radius: 999px;
  color: #f5ebcf;
  cursor: pointer;
  font: 600 12px/25px 'EB Garamond', Garamond, Georgia, serif;
  white-space: nowrap;
  background: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.library-menu-usage-top-up:hover {
  color: #fff8e7;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 6px rgba(228, 201, 149, 0.52);
}

.library-menu-usage-top-up:focus-visible {
  color: #fff8e7;
  outline: 1px solid #d5bc88;
  outline-offset: -3px;
}

.library-menu-usage-card.is-top-up .library-menu-usage-progress-fill {
  background: linear-gradient(90deg, #164866, #236b92);
  box-shadow:
    0 0 6px rgba(35, 107, 146, 0.64),
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -5px 7px rgba(4, 28, 43, 0.46);
}

.library-menu-tier-badge:hover {
  color: #f2f2f2;
}

.library-menu-tier-badge:hover .library-menu-usage-label,
.library-menu-tier-badge:focus-visible .library-menu-usage-label {
  color: #f2f2f2;
}

.library-menu-circle-action {
  position: relative;
  top: -10px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: #777a80;
  background: transparent;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.library-menu-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #202020;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 20px rgba(0, 0, 0, 0.28);
}

.library-menu-notification-circle {
  width: var(--library-menu-notification-circle-size);
  height: var(--library-menu-notification-circle-size);
}

.library-menu-circle-icon {
  display: block;
  width: auto;
  object-fit: contain;
  opacity: 0.92;
  transition: opacity 0.18s ease, filter 0.18s ease;
}

.library-menu-notification-icon {
  height: var(--library-menu-notification-icon-height);
}

.library-menu-circle-action:hover .library-menu-circle-icon,
.library-menu-circle-action:focus-visible .library-menu-circle-icon {
  filter: brightness(1.1);
  opacity: 1;
}

.library-menu-account-menu {
  position: relative;
  top: -10px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.library-menu-account-button {
  display: flex;
  width: var(--library-menu-account-size);
  height: var(--library-menu-account-size);
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--library-menu-account-radius);
  color: #fff5ee;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 42%),
    #5f0000;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -12px 18px rgba(38, 0, 0, 0.34),
    0 10px 18px rgba(0, 0, 0, 0.28);
  filter: saturate(0.72) brightness(0.72);
  opacity: 0.82;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.library-menu-account-button.active,
.library-menu-account-button:hover,
.library-menu-account-button:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0) 42%),
    #a90000;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    inset 0 -12px 18px rgba(88, 0, 0, 0.3),
    0 16px 26px rgba(0, 0, 0, 0.38);
  filter: saturate(1.08) brightness(1.08);
  opacity: 1;
}

.library-menu-account-initial {
  display: block;
  color: inherit;
  font-size: var(--library-menu-account-font-size);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.library-membership-shell {
  width: min(1040px, calc(100vw - 72px));
}

.library-membership-heading {
  width: 100%;
  margin: 0 auto;
}

.library-membership-title {
  display: flex;
  width: min(760px, 100%);
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 22px);
  margin: 0 auto clamp(22px, 3vh, 30px);
  text-align: center;
}

.library-membership-title img {
  display: block;
  width: clamp(94px, 10vw, 152px);
  height: auto;
  opacity: 0.9;
}

.library-membership-title h1 {
  margin: 0;
  color: #f2f2f2;
  font-size: clamp(24px, 2.6vw, 40px);
  font-weight: 400;
  line-height: 1.08;
  white-space: nowrap;
}

.library-membership-heading p {
  box-sizing: border-box;
  width: min(100%, 680px);
  margin: 0 auto;
  color: rgba(242, 242, 242, 0.82);
  font-size: 17px;
  line-height: 1.4;
  text-align: left;
}

.library-membership-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(22px, 3vw, 36px);
  width: 70%;
  margin: 0 auto;
}

.library-membership-usage-note {
  width: min(100%, 900px);
  margin: 18px auto 0;
  color: rgba(245, 235, 207, 0.72);
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.45;
  text-align: center;
}

.library-membership-card {
  box-sizing: border-box;
  display: flex;
  min-height: clamp(470px, 58vh, 580px);
  flex-direction: column;
  padding: clamp(28px, 3.4vw, 42px);
  border-radius: 14px;
  color: #eee8df;
}

.library-membership-guest {
  border: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 42%),
    #17191c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.library-membership-patron {
  border: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 40%),
    linear-gradient(180deg, #123a2f 0%, #09231c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 0 28px rgba(190, 143, 65, 0.13);
}

.library-membership-card-header {
  min-height: 190px;
  text-align: center;
}

.library-membership-card h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.library-membership-tier-image {
  display: block;
  width: clamp(232px, 22vw, 308px);
  max-width: 100%;
  height: auto;
}

.library-membership-price {
  margin: 10px 0 0;
  color: #d8c38f;
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.2;
}

.library-membership-price span {
  color: #f4e5b9;
  font-size: 1.35em;
}

.library-membership-features {
  display: grid;
  gap: clamp(16px, 2.2vh, 22px);
  margin: clamp(22px, 3vh, 30px) 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.35;
}

.library-membership-features li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.library-membership-features li span {
  color: #d5b46e;
  line-height: 1.35;
}

.library-membership-card-action {
  min-height: 86px;
  margin-top: auto;
  padding-top: clamp(24px, 3.5vh, 34px);
}

.library-membership-card-divider {
  display: block;
  width: min(142px, 56%);
  height: auto;
  margin: clamp(18px, 2.5vh, 26px) auto 0;
  opacity: 0.72;
}

.library-membership-secure-payment {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: clamp(22px, 3vh, 30px) 0 0;
  color: rgba(238, 232, 223, 0.58);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.3;
  text-align: center;
}

.library-membership-secure-payment[hidden] {
  display: none;
}

.library-membership-secure-payment img {
  display: block;
  width: 30px;
  height: auto;
  object-fit: contain;
}

.library-membership-secure-payment p {
  margin: 0;
}

.library-subscribe {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 36px;
  margin: clamp(8px, 1.5vh, 16px) 0 0;
  padding: 7px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f4eee6;
  background: radial-gradient(circle at 50% 36%, rgba(93,93,93,0.98) 0%, rgba(72,72,72,0.98) 78%, rgba(55,55,55,0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 5px 0 rgba(0,0,0,0.08),
    0 12px 22px rgba(0,0,0,0.22);
  cursor: pointer;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 400;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.library-subscribe:hover {
  transform: translateY(-1px);
}

.library-subscribe[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.library-subscription-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.library-subscription-status {
  margin: 0 auto 12px;
  color: #ddd4c8;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(16px, 1.3vw, 20px);
  text-align: center;
}

.library-manage-subscription {
  min-height: 36px;
  margin-top: clamp(8px, 1.5vh, 16px);
  padding: 7px 22px;
  border: 1px solid rgba(213, 188, 136, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, #18483a 0%, #0d271f 100%);
  color: #f5ebcf;
  cursor: pointer;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(16px, 1.35vw, 20px);
}

.library-membership-subscribe-wrap:has(.library-subscribe[hidden]),
.library-membership-manage-wrap:has(.library-manage-subscription[hidden]) {
  display: none;
}

.library-membership-subscribe-wrap .library-subscribe,
.library-membership-manage-wrap .library-manage-subscription {
  margin: 0;
}

.library-membership-subscribe-wrap .library-subscribe:hover,
.library-membership-subscribe-wrap .library-subscribe:focus-visible {
  transform: none;
}

.library-manage-subscription:disabled {
  cursor: wait;
  opacity: 0.72;
}

.library-subscribe[hidden],
.library-manage-subscription[hidden] {
  display: none !important;
}

.library-my-shelf-hero {
  margin-bottom: 0;
}

.library-my-shelf-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.8vw, 28px);
  margin-bottom: 10px;
}

.library-my-shelf-title h1 {
  margin: 0;
}

.library-my-shelf-title img {
  display: block;
  width: clamp(54px, 10vw, 152px);
  height: auto;
  opacity: 0.9;
}

.library-shelf-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: clamp(92px, 13vw, 220px);
  width: min(95%, 1040px);
  margin: clamp(58px, 8vh, 92px) auto 0;
}

.library-shelf-tab {
  padding: 0;
  border: 0;
  background: transparent;
  color: #777a80;
  cursor: pointer;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 400;
  line-height: 1;
  transition: color 0.22s ease, opacity 0.22s ease;
}

.library-shelf-tab.is-active,
.library-shelf-tab:hover,
.library-shelf-tab:focus-visible {
  color: #f2f2f2;
  outline: none;
}

.library-shelf-panel {
  position: relative;
  z-index: 1;
  width: min(95%, 1440px);
  margin: clamp(30px, 4.4vh, 52px) auto 0;
  color: #f2f2f2;
}

.library-shelf-panel[hidden] {
  display: none;
}

.library-shelf-panel.is-active {
  animation: libraryShelfPanelIn 0.42s ease both;
}

.library-saved-empty,
.library-sigils-empty,
.library-wisps-empty {
  margin-top: clamp(18px, 2.4vh, 30px);
  text-align: center;
}

.library-saved-grid,
.library-sigils-grid,
.library-wisps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.2vw, 34px);
  align-items: start;
}

.library-saved-grid .book-card {
  width: 100%;
  justify-self: stretch;
}

.library-sigils-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: clamp(28px, 4vh, 46px) auto 0;
  color: #bcae8d;
  font-family: "EB Garamond", Georgia, serif;
}

.library-sigils-pagination[hidden] {
  display: none;
}

.library-sigils-page-status {
  min-width: 54px;
  color: #d8c9a6;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.library-sigils-page-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(188, 174, 141, 0.42);
  border-radius: 50%;
  background: rgba(20, 24, 25, 0.72);
  color: #cdbd98;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.library-sigils-page-button:hover:not(:disabled),
.library-sigils-page-button:focus-visible:not(:disabled) {
  border-color: rgba(210, 173, 102, 0.86);
  background: rgba(40, 48, 46, 0.9);
  color: #f0dbad;
  outline: none;
}

.library-sigils-page-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.library-saved-item {
  min-width: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.library-saved-item.is-entering {
  animation: librarySavedItemIn 0.38s ease both;
}

.library-sigil-item {
  min-width: 0;
  opacity: 1;
  transform: translateY(0);
  text-align: center;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.library-sigil-item.is-entering {
  animation: librarySavedItemIn 0.38s ease both;
}

.library-sigil-media {
  width: min(100%, 260px);
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.library-sigil-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.25s ease;
}

.library-sigil-portrait-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 35%, rgba(245, 235, 207, 0.18), rgba(245, 235, 207, 0.02) 58%),
    radial-gradient(circle at 50% 50%, rgba(68, 72, 76, 0.98), rgba(24, 26, 30, 0.98));
  transition: box-shadow 0.25s ease;
}

.library-sigil-copy {
  margin-top: 14px;
}

.library-sigil-copy h3 {
  margin: 0;
  color: #f5ebcf;
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 600;
  line-height: 1.08;
}

.library-sigil-copy p {
  margin: 7px 0 0;
  color: rgba(245, 235, 207, 0.66);
  font-size: clamp(13px, 0.95vw, 15px);
  line-height: 1.2;
}

.library-sigil-item[role="button"] {
  cursor: default;
  outline: none;
}

.library-sigil-item[role="button"]:focus-visible .library-sigil-media {
  outline: 1px solid rgba(245, 235, 207, 0.72);
  outline-offset: 8px;
}

.library-sigil-media {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.library-sigil-item:not(.is-conversing)[role="button"]:focus-visible .library-sigil-portrait {
  filter:
    drop-shadow(0 0 5px rgba(70, 145, 255, 0.48))
    drop-shadow(0 0 14px rgba(28, 101, 235, 0.34))
    drop-shadow(0 0 28px rgba(8, 48, 170, 0.22));
}

.library-sigil-item:not(.is-conversing)[role="button"]:focus-visible .library-sigil-portrait-fallback {
  box-shadow: 0 0 14px rgba(28, 101, 235, 0.34), 0 0 28px rgba(8, 48, 170, 0.22);
}

@media (hover: hover) and (pointer: fine) {
  .library-sigil-item:not(.is-conversing):hover .library-sigil-portrait {
    filter:
      drop-shadow(0 0 5px rgba(70, 145, 255, 0.48))
      drop-shadow(0 0 14px rgba(28, 101, 235, 0.34))
      drop-shadow(0 0 28px rgba(8, 48, 170, 0.22));
  }

  .library-sigil-item:not(.is-conversing):hover .library-sigil-portrait-fallback {
    box-shadow: 0 0 14px rgba(28, 101, 235, 0.34), 0 0 28px rgba(8, 48, 170, 0.22);
  }
}

.library-sigil-item.is-conversing .library-sigil-portrait {
  animation: librarySigilConversationGlow 2.2s ease-in-out infinite;
  filter:
    drop-shadow(0 0 8px rgba(70, 145, 255, 0.98))
    drop-shadow(0 0 22px rgba(28, 101, 235, 0.86))
    drop-shadow(0 0 48px rgba(8, 48, 170, 0.68));
}

.library-sigil-item.is-conversing .library-sigil-portrait-fallback {
  animation: librarySigilConversationGlowFallback 2.2s ease-in-out infinite;
}

@keyframes librarySigilConversationGlow {
  0%, 100% {
    filter:
      drop-shadow(0 0 7px rgba(70, 145, 255, 0.94))
      drop-shadow(0 0 18px rgba(28, 101, 235, 0.76))
      drop-shadow(0 0 38px rgba(8, 48, 170, 0.56));
  }
  50% {
    filter:
      drop-shadow(0 0 11px rgba(112, 180, 255, 1))
      drop-shadow(0 0 30px rgba(42, 126, 255, 0.96))
      drop-shadow(0 0 62px rgba(10, 58, 195, 0.76));
  }
}

@keyframes librarySigilConversationGlowFallback {
  0%, 100% {
    box-shadow: 0 0 18px rgba(28, 101, 235, 0.76), 0 0 38px rgba(8, 48, 170, 0.56);
  }
  50% {
    box-shadow: 0 0 30px rgba(42, 126, 255, 0.96), 0 0 62px rgba(10, 58, 195, 0.76);
  }
}

.library-sigil-dialog {
  --library-sigil-dialog-filigree-height: 36px;
  box-sizing: border-box;
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 3000;
  display: flex;
  width: min(850px, 95vw);
  min-height: 220px;
  height: auto;
  max-height: calc(90vh - 70px);
  padding: 24px 0 0;
  overflow: hidden;
  color: #fff;
  font-family: 'EB Garamond', Garamond, Georgia, serif;
  background:
    repeating-radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at 50% 50%, #39745a 0%, #173d31 54%, #09251e 100%);
  border: 1px solid #777a80;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: transform 0.35s ease, opacity 0.35s ease, padding-bottom 0.35s ease;
}

.library-sigil-dialog.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.library-sigil-dialog.ended {
  padding-bottom: calc(var(--library-sigil-dialog-filigree-height) + 12px);
}

.library-sigil-dialog::after {
  content: "";
  position: absolute;
  left: calc(50% + 8px);
  bottom: 10px;
  width: 230px;
  height: var(--library-sigil-dialog-filigree-height);
  background: url("https://storage.googleapis.com/narralogue-assets/fictions/static_common/misc/panel_bottom.webp") center bottom / contain no-repeat;
  filter: grayscale(1) brightness(0.95) contrast(1.1);
  mix-blend-mode: multiply;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.library-sigil-dialog.ended::after {
  opacity: 0.55;
  transform: translateX(-50%) translateY(0);
}

.library-sigil-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 20px;
  height: 20px;
  padding: 0;
  color: #000;
  font: 14px/20px Arial, sans-serif;
  background: #4d6a46;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.92;
}

.library-sigil-dialog-close:hover,
.library-sigil-dialog-close:focus-visible {
  background: #567850;
  opacity: 1;
}

.library-sigil-dialog-filigree {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 3;
  width: 180px;
  height: auto;
  filter: grayscale(1) brightness(0.95) contrast(1.1);
  mix-blend-mode: multiply;
  opacity: 0.55;
  pointer-events: none;
  transform: translateX(-50%);
}

.library-sigil-dialog-left {
  flex: 0 0 160px;
  width: 160px;
  min-width: 160px;
}

.library-sigil-dialog-portrait-wrap {
  position: absolute;
  left: 12px;
  top: -12px;
  bottom: auto;
  z-index: 2;
  pointer-events: none;
  transform: translateY(15px);
}

.library-sigil-dialog-portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: -1;
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.9), 0 6px 10px rgba(0, 0, 0, 0.6);
}

.library-sigil-dialog-portrait {
  display: block;
  width: auto;
  max-height: 215px;
  object-fit: contain;
}

.library-sigil-dialog-center {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  padding: 3px 18px 12px;
}

.library-sigil-dialog-thread {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
  padding: 0 10px 4px 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: #fff;
  font-size: 15px;
  line-height: 1.75;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.library-sigil-dialog-thread > .library-sigil-dialog-line,
.library-sigil-dialog-thread > .library-sigil-dialog-turn,
.library-sigil-dialog-thread > .library-sigil-dialog-chime-stack {
  flex: 0 0 auto;
}

.library-sigil-dialog-thread::-webkit-scrollbar,
.library-sigil-dialog-input::-webkit-scrollbar {
  width: 6px;
}

.library-sigil-dialog-thread::-webkit-scrollbar-thumb,
.library-sigil-dialog-input::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.library-sigil-dialog-line {
  padding-right: 8px;
  white-space: pre-wrap;
}

.library-sigil-dialog-line.is-opening {
  margin: 0 0 4px;
}

.library-sigil-dialog-line.is-reply {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.library-sigil-dialog-line.is-reply.show {
  opacity: 1;
}

.library-sigil-dialog-chime-stack {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.library-sigil-dialog-chime {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 1.35s ease, transform 1.35s ease;
}

.library-sigil-dialog-chime.show {
  opacity: 1;
  transform: translateY(0);
}

.library-sigil-dialog-chime-portrait {
  display: block;
  width: auto;
  height: 80px;
  max-width: 70px;
  margin: 0 8px 0 0;
  flex-shrink: 0;
  object-fit: contain;
  overflow: visible;
  background: transparent;
  border-radius: 0;
  box-shadow: none !important;
  filter: none !important;
  mix-blend-mode: normal;
}

.library-sigil-dialog-chime-text {
  color: #f3eada;
  font-size: inherit;
  line-height: 1.75;
  white-space: pre-wrap;
  opacity: 0.85;
}

.library-sigil-dialog-chime-text strong {
  color: inherit;
  font-weight: 400;
}

.library-sigil-dialog-speaker {
  color: #f3eada;
  font-weight: 600;
}

.library-sigil-dialog-turn {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.library-sigil-dialog-input-wrap {
  position: relative;
}

.library-sigil-dialog-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 3.5rem;
  max-height: min(180px, 45vh);
  padding: 10px 48px 20px 14px;
  resize: none;
  overflow-y: auto;
  color: #1a1a1a;
  font: 15px/1.75 'EB Garamond', Garamond, Georgia, serif;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  box-shadow: none;
}

.library-sigil-dialog-input:focus {
  outline: none;
}

.library-sigil-dialog-turn.locked .library-sigil-dialog-input {
  color: #1a1a1a;
  background: #f2f2f2;
  opacity: 0.92;
}

.library-sigil-dialog-submit {
  position: absolute;
  right: 10px;
  bottom: 14px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  color: #1a1a1a;
  background: #f2f2f2;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  cursor: pointer;
}

.library-sigil-dialog-submit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.library-sigil-dialog-submit:disabled {
  cursor: default;
  filter: grayscale(0.5);
  opacity: 0.48;
}

.library-sigil-dialog-loading {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding-left: 10px;
}

.library-sigil-dialog-loading span {
  width: 6px;
  height: 6px;
  background: #f3eada;
  border-radius: 50%;
  animation: librarySigilDialogDot 1.15s ease-in-out infinite;
}

.library-sigil-dialog-loading span:nth-child(2) {
  animation-delay: 0.14s;
}

.library-sigil-dialog-loading span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes librarySigilDialogDot {
  0%, 60%, 100% { opacity: 0.35; }
  30% { opacity: 1; }
}

.library-sigil-dialog-status {
  margin: 7px 10px 0 0;
  color: #f3eada;
  font-size: 14px;
  line-height: 1.3;
}

@media (max-width: 600px) {
  .library-sigil-dialog {
    --library-sigil-dialog-mobile-portrait-overhang: 228px;
    --library-sigil-dialog-mobile-top-gap: 10px;
    width: min(850px, 97vw);
    min-height: 220px;
    max-height: calc(100vh - env(safe-area-inset-top) - var(--library-sigil-dialog-mobile-top-gap) - var(--library-sigil-dialog-mobile-portrait-overhang));
    max-height: calc(100dvh - env(safe-area-inset-top) - var(--library-sigil-dialog-mobile-top-gap) - var(--library-sigil-dialog-mobile-portrait-overhang));
    padding-top: 12px;
    overflow: visible;
  }

  .library-sigil-dialog-left {
    display: none;
    width: 0;
    min-width: 0;
  }

  .library-sigil-dialog-portrait-wrap {
    top: calc(-1 * var(--library-sigil-dialog-mobile-portrait-overhang));
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .library-sigil-dialog-portrait {
    width: auto;
    max-height: 215px;
  }

  .library-sigil-dialog-center {
    width: 100%;
    padding: 28px 20px calc(var(--library-sigil-dialog-filigree-height) + 2px);
  }

  .library-sigil-dialog-thread {
    margin-top: 10px;
    padding-right: 7px;
    font-size: 17px;
  }

  .library-sigil-dialog-line.is-opening {
    margin: 0;
  }

  .library-sigil-dialog-input {
    font-size: 17px;
  }

  .library-sigil-dialog-filigree {
    top: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .library-sigil-item.is-conversing .library-sigil-portrait,
  .library-sigil-item.is-conversing .library-sigil-portrait-fallback,
  .library-sigil-dialog-loading span {
    animation: none;
  }

  .library-sigil-dialog-line.is-reply {
    transition: none;
  }

  .library-sigil-dialog-chime {
    transition: none;
  }

  .library-sigil-dialog {
    transition: none;
  }
}

.usage-exhaustion-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.28s ease;
}

.usage-exhaustion-popup-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.usage-exhaustion-recharge-modal {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(635px, calc(100vw - 36px));
  aspect-ratio: 907 / 689;
  max-height: calc(100vh - 40px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #777a80;
  border-radius: 10px;
  background: #181818;
  color: #f2f2f2;
  font-family: 'EB Garamond', Georgia, serif;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(12px);
}

.usage-exhaustion-popup-backdrop.is-visible .usage-exhaustion-recharge-modal {
  animation: libraryUsageRechargeModalIn 0.34s ease forwards;
}

.usage-exhaustion-recharge-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.usage-exhaustion-recharge-content {
  position: absolute;
  z-index: 1;
  right: clamp(30px, 7vw, 72px);
  top: 50%;
  width: min(330px, 46%);
  padding: 22px 44px 26px 0;
  color: #f2f2f2;
  text-align: left;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 0, 0, 0.72);
  transform: translate(80px, -38%);
}

.usage-exhaustion-recharge-content::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 clamp(-40px, -4vw, -24px) 0 clamp(-40px, -4vw, -24px);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.56) 0%, rgba(0, 0, 0, 0.38) 58%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.usage-exhaustion-recharge-content h2 {
  margin: -15px 0 8px;
  color: #f2f2f2;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.05;
  text-align: center;
}

.usage-exhaustion-recharge-divider {
  display: block;
  width: min(195px, 60%);
  height: auto;
  margin: 0 auto 24px;
  opacity: 0.82;
  pointer-events: none;
}

.usage-exhaustion-recharge-copy {
  margin: 0 0 38px;
  color: #f2f2f2;
  font-size: calc(clamp(14px, 1.575vw, 23.8px) - 2pt);
  line-height: 1.26;
  text-align: center;
}

.usage-exhaustion-recharge-error {
  margin: -26px auto 12px;
  max-width: 360px;
  color: #f0c9a4;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
}

.usage-exhaustion-recharge-price {
  margin: 0 0 34px;
  color: #fff;
  font-size: calc(20px + 5pt);
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.usage-exhaustion-recharge-exchanges {
  display: block;
  margin-top: 8px;
  color: rgba(242, 242, 242, 0.78);
  font-size: clamp(12px, 1.05vw, 16px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.usage-exhaustion-recharge-actions {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.usage-exhaustion-recharge-btn-frame {
  --usage-exhaustion-recharge-btn-height: 42px;
  --usage-exhaustion-recharge-btn-font-size: clamp(17px, 1.24vw, 20px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d5bc88 0%, #b88c4b 20%, #8b6837 50%, #b88c4b 80%, #e4c995 100%);
  box-shadow: 0 18px 24px rgba(0, 0, 0, 0.52), 0 3px 12px rgba(222, 177, 92, 0.18), inset 0 2px 2px rgba(255, 255, 255, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.25s ease;
}

.usage-exhaustion-recharge-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--usage-exhaustion-recharge-btn-height);
  min-width: 124px;
  padding: 0 28px;
  border: none;
  outline: none;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(180deg, #18483a 0%, #12362c 35%, #0d271f 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), inset 0 -8px 12px rgba(0, 0, 0, 0.45);
  color: #f5ebcf;
  cursor: pointer;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--usage-exhaustion-recharge-btn-font-size);
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, opacity 0.18s ease;
}

.usage-exhaustion-recharge-btn::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 40%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.usage-exhaustion-recharge-btn-frame:hover,
.usage-exhaustion-recharge-btn-frame:focus-within {
  box-shadow: 0 22px 34px rgba(0, 0, 0, 0.58), 0 0 18px rgba(224, 183, 103, 0.26), 0 4px 14px rgba(222, 177, 92, 0.2), inset 0 2px 2px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.usage-exhaustion-recharge-btn:hover,
.usage-exhaustion-recharge-btn:focus-visible {
  outline: none;
  background: linear-gradient(180deg, #1d5545 0%, #154235 40%, #103027 100%);
}

.usage-exhaustion-recharge-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
}

.usage-exhaustion-recharge-btn:disabled {
  cursor: wait;
  opacity: 0.75;
}

.usage-exhaustion-recharge-skip {
  border: 0;
  padding: 0;
  background: transparent;
  color: #f4eee6;
  cursor: pointer;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: calc(21px - 4pt);
  line-height: 1;
}

.usage-exhaustion-recharge-skip:hover {
  color: #fff;
}

@keyframes libraryUsageRechargeModalIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .usage-exhaustion-popup-backdrop {
    align-items: flex-start;
    padding: 18px;
    overflow-y: auto;
  }

  .usage-exhaustion-recharge-modal {
    width: min(301px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
    margin: auto 0;
  }

  .usage-exhaustion-recharge-content {
    right: 24px;
    width: min(220px, 58%);
    padding: 12px 20px 14px 0;
    transform: translate(22px, -36%);
  }

  .usage-exhaustion-recharge-content h2 {
    margin: -8px 0 6px;
    font-size: 16px;
  }

  .usage-exhaustion-recharge-divider {
    width: min(109px, 57%);
    margin-bottom: 12px;
  }

  .usage-exhaustion-recharge-copy {
    margin-bottom: 18px;
    font-size: calc(clamp(10.5px, 1.75vw, 16.1px) - 2pt);
    line-height: 1.22;
  }

  .usage-exhaustion-recharge-price {
    margin-bottom: 16px;
    font-size: calc(10px + 5pt);
  }

  .usage-exhaustion-recharge-exchanges {
    margin-top: 5px;
    font-size: 11px;
  }

  .usage-exhaustion-recharge-btn-frame {
    --usage-exhaustion-recharge-btn-height: 30px;
    --usage-exhaustion-recharge-btn-font-size: 13px;
  }

  .usage-exhaustion-recharge-btn {
    padding: 0 14px;
  }

  .usage-exhaustion-recharge-actions {
    gap: 10px;
  }

  .usage-exhaustion-recharge-skip {
    font-size: 13px;
  }
}

.library-wisp-item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: 310px;
  padding: 14px;
  border: 1px solid rgba(214, 188, 130, 0.34);
  background: rgba(14, 17, 15, 0.78);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  color: #f2f2f2;
  cursor: pointer;
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.library-wisp-item:hover,
.library-wisp-item:focus-visible {
  border-color: rgba(214, 188, 130, 0.72);
  outline: none;
  transform: translateY(-2px);
}

.library-wisp-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(245, 235, 207, 0.08);
}

.library-wisp-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-wisp-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(214, 188, 130, 0.62);
  box-shadow: 0 0 22px rgba(214, 188, 130, 0.28);
}

.library-wisp-copy {
  min-width: 0;
}

.library-wisp-copy h3 {
  margin: 0;
  color: #f5ebcf;
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 600;
  line-height: 1.08;
}

.library-wisp-meta {
  margin: 8px 0 0;
  color: rgba(245, 235, 207, 0.68);
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.2;
}

.library-wisp-preview {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 12px 0 0;
  color: rgba(242, 242, 242, 0.84);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.36;
}

.library-wisp-delete,
.library-wisp-modal-delete {
  width: max-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(242, 242, 242, 0.72);
  cursor: pointer;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.library-wisp-delete:hover,
.library-wisp-delete:focus-visible,
.library-wisp-modal-delete:hover,
.library-wisp-modal-delete:focus-visible {
  color: #d6bc82;
  outline: none;
}

.library-wisp-delete:disabled,
.library-wisp-modal-delete:disabled {
  cursor: wait;
  opacity: 0.58;
}

body.library-wisp-open {
  overflow: hidden;
}

.library-wisp-empty-thread {
  margin: 0;
  color: rgba(242, 242, 242, 0.72);
}

.library-page {
  --drawer-h: 220px;
  --drawer-w: 850px;
  --filigree-h: 36px;
  --thumb-size: 80px;
  --input-fs: 15px;
  --reply-fs: 15px;
  --dialog-lh: 1.0;
}

.wisp-memory-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 24px 0;
  background: rgba(20, 20, 20, 0.18);
  z-index: 2600;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.wisp-memory-backdrop.open {
  opacity: 1;
}

.wisp-memory-panel {
  position: relative;
  width: min(var(--drawer-w), 95vw);
  max-height: 90vh;
  display: flex;
  align-items: stretch;
  overflow: visible;
  border-radius: 12px;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.wisp-memory-backdrop.open .wisp-memory-panel {
  transform: translateY(0);
  opacity: 1;
}

.wisp-memory-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #202020;
  cursor: pointer;
  z-index: 4;
  line-height: 20px;
}

.wisp-memory-close:hover,
.wisp-memory-close:focus-visible {
  opacity: 1;
  background: #8a8a8a;
  outline: none;
}

.wisp-replay-shell {
  position: relative;
  display: flex;
  gap: 0;
  overflow: hidden;
  min-height: var(--drawer-h);
  width: 100%;
  height: auto;
  max-height: inherit;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 50% 40%, rgba(92, 92, 92, 0.90) 0%, rgba(68, 68, 68, 0.90) 78%, rgba(48, 48, 48, 0.90) 100%);
}

.wisp-replay-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18) 100%),
    url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABWUlEQVQ4T7WTPUsDQRSGn6xIk5A0sZSyMZmCiCB0A9kZNg4WQ5DY1sYukBCUiBhbFq0WkwsgHjYrKJiZycJQp6DcVFE3+WPb5x3zj3rnP/3Ok58nMJMIr/ASERcg5jc4vF3IBIF4XtwCHgLXRiKtvYZjCUEG6M0+kC44lKrYAfET4ZTLPQ4vYwHiHc1o0mZKZ5XLy+EMT3IYPAdtOCQ1f2UAPy7wr5gmQtnD8NIRwG8a8dCrvM3fUrD0PHyw2MFS4EPUlhRllv8L4xsc3rcnY46iFeBvF/4DyvKMRCwbb/jaMZpAGDHR9m8WitYGWcSM2JmxWYj7O8KXONN+XH4Wb20zWzt7qETnBtOVb6wbwBtr9TfLUvMT0S2AAAAAElFTkSuQmCC");
  background-repeat: no-repeat, repeat;
  background-size: cover, 60px 60px;
  opacity: 0.85;
  mix-blend-mode: overlay;
  filter: contrast(120%) brightness(95%);
}

.wisp-replay-shell::after {
  content: "";
  position: absolute;
  left: calc(50% + 8px);
  bottom: 10px;
  transform: translateX(-50%);
  width: 180px;
  height: var(--filigree-h);
  background-image: url("https://storage.googleapis.com/narralogue-assets/fictions/static_common/misc/panel_bottom.webp");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  mix-blend-mode: multiply;
  filter: grayscale(1) brightness(0.95) contrast(1.1);
  opacity: 0.55;
  pointer-events: none;
}

.wisp-replay-left {
  width: 160px;
  min-width: 160px;
  padding: 10px;
}

.wisp-replay-portrait-wrap {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 2;
  pointer-events: none;
}

.wisp-replay-portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.90), 0 6px 10px rgba(0, 0, 0, 0.60);
  z-index: -1;
  pointer-events: none;
}

.wisp-replay-main-portrait {
  display: block;
  max-height: 215px;
  width: auto;
  position: relative;
  z-index: 0;
}

.wisp-replay-center {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 52px 18px calc(var(--filigree-h) + 10px);
  z-index: 1;
}

.wisp-replay-top-filigree {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: auto;
  display: block;
  pointer-events: none;
  z-index: 3;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  mix-blend-mode: multiply;
  filter: grayscale(1) brightness(0.95) contrast(1.1);
  opacity: 0.55;
}

.wisp-replay-thread {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.wisp-replay-turn {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wisp-replay-image-group {
  display: block;
}

.wisp-replay-image-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin: 2px 0 8px;
}

.reply-line.dialog-box,
.wisp-replay-reply {
  max-height: 48vh;
  overflow-y: auto;
  box-sizing: border-box;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding-right: 1rem;
  color: #f3eada !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.12);
  font-size: var(--reply-fs);
  line-height: 1.75;
}

.wisp-replay-reader-box {
  width: 100%;
  border: 1px solid #d5d4c8;
  border-radius: 12px;
  background: #f2f2f2;
  color: #1a1a1a;
  font-size: var(--input-fs);
  line-height: var(--dialog-lh);
  font-family: "EB Garamond", Georgia, serif;
  box-sizing: border-box;
  padding: 12px 14px;
  margin: 2px 0 8px;
}

.wisp-replay-reader-copy {
  white-space: pre-wrap;
}

.wisp-replay-thumb {
  position: relative;
  top: auto;
  left: auto;
  width: var(--thumb-size);
  height: var(--thumb-size);
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  display: block;
  margin: 0;
  z-index: auto;
}

.wisp-replay-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chime {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.chime-portrait,
.wisp-replay-chime-portrait {
  height: 80px;
  width: auto;
  max-width: 70px;
  object-fit: contain;
  border-radius: 0;
  overflow: visible;
  flex-shrink: 0;
  margin-right: 8px;
  box-shadow: none !important;
}

.chime-text,
.wisp-replay-chime-text {
  font-size: var(--reply-fs);
  line-height: 1.75;
  color: #f3eada !important;
  opacity: 0.85;
  white-space: pre-wrap;
}

.wisp-replay-chime {
  margin-left: 0;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.wisp-memory-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 0;
  position: relative;
  z-index: 1;
}

.wisp-like-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #f3eada;
  cursor: pointer;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 16px;
}

.wisp-like-btn.liked {
  background: rgba(255, 255, 255, 0.10);
  color: #f3eada;
}

.wisp-like-count {
  font-size: 13px;
  color: #f3eada;
  opacity: 0.76;
}

.library-wisp-memory-actions .library-wisp-modal-delete {
  margin-top: 0;
  margin-left: 12px;
}

.wisp-replay-thread,
.reply-line.dialog-box {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.wisp-replay-thread::-webkit-scrollbar,
.reply-line.dialog-box::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.wisp-replay-thread::-webkit-scrollbar-track,
.reply-line.dialog-box::-webkit-scrollbar-track {
  background: transparent;
}

.wisp-replay-thread::-webkit-scrollbar-thumb,
.reply-line.dialog-box::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  border: none;
  box-shadow: none;
}

@media (max-width: 600px) {
  .library-page {
    --input-fs: 17px;
    --reply-fs: 17px;
    --wisp-portrait-overhang: 228px;
    --wisp-panel-top-gap: 10px;
    --wisp-floating-cap-trim: 16px;
  }

  .wisp-memory-panel {
    width: min(var(--drawer-w), 97vw);
    max-height: calc(100vh - env(safe-area-inset-top) - var(--wisp-panel-top-gap) - var(--wisp-portrait-overhang) - var(--wisp-floating-cap-trim));
    max-height: calc(100dvh - env(safe-area-inset-top) - var(--wisp-panel-top-gap) - var(--wisp-portrait-overhang) - var(--wisp-floating-cap-trim));
  }

  .wisp-replay-shell {
    min-height: auto;
    overflow: visible;
  }

  .wisp-replay-left {
    width: 0;
    min-width: 0;
    padding: 0;
  }

  .wisp-replay-portrait-wrap {
    position: absolute !important;
    left: 50% !important;
    top: calc(-1 * var(--wisp-portrait-overhang)) !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    z-index: 2;
  }

  .wisp-replay-main-portrait {
    max-height: 215px !important;
    width: auto !important;
  }

  .wisp-replay-center {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    padding: 48px 20px calc(var(--filigree-h) + 2px);
    overflow: hidden;
  }

  .wisp-replay-top-filigree {
    width: 180px;
    height: auto;
    top: 6px;
  }

  .wisp-replay-thread {
    padding-right: 10px;
    padding-bottom: 2px;
  }

  .wisp-replay-shell::after {
    width: 230px;
    left: 50%;
  }
}

.library-page .library-after-hero {
  margin-top: clamp(48px, 8vh, 84px);
  text-align: center;
}

.library-page .intro-welcome {
  margin: 0 0 clamp(46px, 7vh, 76px);
  font-weight: 400;
}

.landing.library-page .library {
  margin-top: 0;
}

.landing.library-page .book-card {
  color: #f2f2f2;
}

.landing.library-page .book-meta,
.landing.library-page .book-tone {
  color: #f2f2f2;
}

.library-page .library-more {
  margin: clamp(52px, 8vh, 84px) 0 clamp(24px, 4vh, 42px);
  font-size: var(--intro-subtitle-size);
  line-height: 1.2;
  color: #f2f2f2;
}

.library-home-discover-note {
  width: min(92vw, 680px);
  margin: clamp(34px, 5vh, 58px) auto clamp(34px, 5vh, 58px);
  color: rgba(242, 242, 242, 0.86);
  text-align: center;
}

.library-home-discover-note p {
  margin: 0;
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.35;
}

.library-home-discover-note a {
  color: #d9bd79;
  text-decoration: none;
  text-shadow: 0 0 14px rgba(217, 189, 121, 0.22);
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.library-home-discover-note a:hover,
.library-home-discover-note a:focus-visible {
  color: #f5ebcf;
  outline: none;
  text-shadow: 0 0 18px rgba(245, 235, 207, 0.32);
}

.library-bottom-subscribe {
  display: flex;
  width: max-content;
  margin: clamp(54px, 8vh, 82px) auto 0;
}

.landing.library-page .intro-footer {
  box-sizing: border-box;
  flex: 0 0 auto;
  color: #f2f2f2;
  width: 100%;
  margin-top: 0;
  padding: clamp(24px, 4vh, 38px) 18px clamp(30px, 5vh, 48px);
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(90deg, rgba(3, 4, 7, 0.76) 0%, rgba(3, 4, 7, 0.28) 26%, rgba(3, 4, 7, 0) 50%, rgba(3, 4, 7, 0.28) 74%, rgba(3, 4, 7, 0.76) 100%),
    linear-gradient(180deg, #2b4252 0%, rgba(43, 66, 82, 0.86) 22%, rgba(22, 34, 43, 0.62) 58%, rgba(3, 4, 7, 0) 100%),
    #030407;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -32px 44px rgba(3, 4, 7, 0.76),
    0 -10px 28px rgba(0, 0, 0, 0.18);
}

.landing.library-page .intro-final-ornament {
  filter: brightness(0) invert(1);
}

/* ===== LIBRARY INTRO MODAL ===== */
body.library-intro-open {
  overflow-x: hidden;
  overflow-y: scroll;
}

body.library-patron-only-open {
  overflow: hidden;
}

.library-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 46px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.library-intro-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.library-intro-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
}

.library-intro-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.library-intro-modal {
  position: relative;
  z-index: 1;
  width: min(1060px, calc(100vw - 36px));
  height: min(608px, calc(100vh - 48px));
  min-height: 0;
  display: grid;
  grid-template-columns:
    minmax(0, min(405.33px, calc(66.667vh - 32px)))
    minmax(0, 1fr);
  overflow: hidden;
  border-radius: 10px;
  background: #181818;
  color: #f2f2f2;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  transform: translateY(12px);
  opacity: 0;
}

.library-intro-overlay.is-open .library-intro-modal {
  animation: libraryIntroModalIn 0.34s ease forwards;
}

.library-intro-overlay.is-closing .library-intro-modal {
  animation: libraryIntroModalOut 0.26s ease forwards;
}

.library-patron-only-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.28s ease;
}

.library-patron-only-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.library-patron-only-backdrop {
  position: absolute;
  inset: 0;
}

.library-patron-only-modal {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(635px, calc(100vw - 36px));
  aspect-ratio: 907 / 689;
  max-height: calc(100vh - 40px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #777a80;
  border-radius: 10px;
  background: #181818;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  color: #f2f2f2;
  font-family: "EB Garamond", Georgia, serif;
  transform: translateY(12px);
  opacity: 0;
}

.library-patron-only-overlay.is-open .library-patron-only-modal {
  animation: libraryIntroModalIn 0.34s ease forwards;
}

.library-patron-only-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.library-patron-only-content {
  position: absolute;
  z-index: 1;
  right: clamp(30px, 7vw, 72px);
  top: 50%;
  width: min(330px, 46%);
  padding: 22px 44px 26px 0;
  color: #f2f2f2;
  text-align: left;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(0, 0, 0, 0.72);
  transform: translate(80px, -38%);
}

.library-patron-only-content::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 clamp(-40px, -4vw, -24px) 0 clamp(-40px, -4vw, -24px);
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.56) 0%,
    rgba(0, 0, 0, 0.38) 58%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

.library-patron-only-content h2 {
  margin: -15px 0 8px;
  color: #f2f2f2;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.05;
  text-align: center;
}

.library-patron-only-divider {
  display: block;
  width: min(195px, 60%);
  height: auto;
  margin: 0 auto 24px;
  opacity: 0.82;
  pointer-events: none;
}

#libraryPatronOnlyCopy {
  margin: 0 0 38px;
  color: #f2f2f2;
  font-size: calc(clamp(14px, 1.575vw, 23.8px) - 2pt);
  line-height: 1.26;
  text-align: center;
}

.library-patron-only-price {
  margin: 0 0 34px;
  color: #fff;
  font-size: calc(20px + 5pt);
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.library-patron-only-price span {
  font-size: inherit;
  line-height: inherit;
}

.library-patron-only-status {
  max-width: 420px;
  margin: -16px 0 22px;
  color: #f5ebcf;
  font-size: 17px;
  line-height: 1.35;
  text-align: center;
}

.library-patron-only-status[hidden],
.library-patron-only-subscribe[hidden] {
  display: none !important;
}

.library-patron-only-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.library-patron-only-subscribe-wrap {
  --library-patron-only-btn-width: auto;
  --library-patron-only-btn-height: 42px;
  --library-patron-only-btn-font-size: clamp(17px, 1.24vw, 20px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #d5bc88 0%,
    #b88c4b 20%,
    #8b6837 50%,
    #b88c4b 80%,
    #e4c995 100%
  );
  box-shadow:
    0 18px 24px rgba(0, 0, 0, 0.52),
    0 3px 12px rgba(222, 177, 92, 0.18),
    inset 0 2px 2px rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.25s ease;
}

.library-patron-only-subscribe {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--library-patron-only-btn-width);
  height: var(--library-patron-only-btn-height);
  min-width: 176px;
  padding: 0 28px;
  border: none;
  outline: none;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #18483a 0%,
    #12362c 35%,
    #0d271f 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    inset 0 -8px 12px rgba(0, 0, 0, 0.45);
  color: #f5ebcf;
  cursor: pointer;
  font-family: "EB Garamond", Georgia, serif;
  font-size: var(--library-patron-only-btn-font-size);
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    opacity 0.18s ease;
}

.library-patron-only-subscribe::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 40%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

.library-patron-only-subscribe-wrap:hover,
.library-patron-only-subscribe-wrap:focus-within {
  box-shadow:
    0 22px 34px rgba(0, 0, 0, 0.58),
    0 0 18px rgba(224, 183, 103, 0.26),
    0 4px 14px rgba(222, 177, 92, 0.2),
    inset 0 2px 2px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.library-patron-only-subscribe:hover,
.library-patron-only-subscribe:focus-visible {
  background: linear-gradient(
    180deg,
    #1d5545 0%,
    #154235 40%,
    #103027 100%
  );
  outline: none;
}

.library-patron-only-subscribe:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.55);
}

.library-patron-only-subscribe:disabled {
  cursor: wait;
  opacity: 0.75;
}

.library-patron-only-cancel {
  border: 0;
  padding: 0;
  background: transparent;
  color: #f4eee6;
  cursor: pointer;
  font-family: "EB Garamond", Georgia, serif;
  font-size: calc(21px - 4pt);
  line-height: 1;
}

.library-patron-only-cancel:hover,
.library-patron-only-cancel:focus-visible {
  color: #fff;
  outline: none;
}

@media (max-width: 700px) {
  .library-membership-comparison {
    grid-template-columns: 1fr;
    gap: 22px;
    width: 100%;
  }

  .library-membership-card {
    min-height: 0;
    padding: 28px 22px;
  }

  .library-membership-card-header {
    min-height: 0;
  }

  .library-membership-features {
    margin-top: 24px;
  }

  .library-membership-guest .library-membership-card-action {
    display: none;
  }

  .library-membership-patron .library-membership-card-action {
    min-height: 0;
  }

  .library-patron-only-overlay {
    padding: 18px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .library-patron-only-modal {
    width: min(301px, calc(100vw - 36px));
    aspect-ratio: 907 / 689;
    max-height: calc(100vh - 36px);
    margin: auto 0;
  }

  .library-patron-only-content {
    right: 24px;
    width: min(220px, 58%);
    padding: 12px 20px 14px 0;
    transform: translate(22px, -36%);
  }

  .library-patron-only-content h2 {
    margin: -8px 0 6px;
    font-size: 16px;
  }

  .library-patron-only-divider {
    width: min(109px, 57%);
    margin-bottom: 12px;
  }

  #libraryPatronOnlyCopy {
    margin-bottom: 18px;
    font-size: calc(clamp(10.5px, 1.75vw, 16.1px) - 2pt);
    line-height: 1.22;
  }

  .library-patron-only-price {
    margin-bottom: 16px;
    font-size: calc(10px + 5pt);
  }

  .library-patron-only-subscribe-wrap {
    --library-patron-only-btn-height: 30px;
    --library-patron-only-btn-font-size: 13px;
  }

  .library-patron-only-subscribe {
    min-width: 124px;
    padding: 0 14px;
  }

  .library-patron-only-actions {
    gap: 10px;
  }

  .library-patron-only-cancel {
    font-size: 13px;
  }
  .library-patron-only-modal {
    width: min(487px, calc(100vw - 24px));
    height: min(585px, calc((100vw - 24px) * 1.201232));
    aspect-ratio: 487 / 585;
    max-height: calc(100vh - 24px);
    border: 1px solid rgba(228, 201, 149, .78);
    border-radius: 9px;
    background: radial-gradient(
      circle at 50% 36%,
      rgb(93, 93, 93) 0%,
      rgb(72, 72, 72) 78%,
      rgb(55, 55, 55) 100%
    );
    box-shadow:
      0 18px 48px rgba(0, 0, 0, .46),
      inset 0 1px 0 rgba(255, 255, 255, .16);
  }
  .library-patron-only-modal .library-patron-only-image {
    object-fit: cover;
    object-position: center;
    filter: brightness(.68) saturate(.86);
  }
  .library-patron-only-modal::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background:
      radial-gradient(
        circle at 50% 36%,
        rgba(93, 93, 93, .20) 0%,
        rgba(72, 72, 72, .38) 78%,
        rgba(55, 55, 55, .58) 100%
      ),
      linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .34));
    pointer-events: none;
  }
  .library-patron-only-modal .library-patron-only-content {
    top: 50%;
    right: auto;
    left: 50%;
    width: calc(100% - 36px);
    max-width: none;
    box-sizing: border-box;
    padding: 18px 18px 22px;
    transform: translate(-50%, -50%);
    text-align: center;
  }
  .library-patron-only-modal .library-patron-only-content::before {
    display: none;
  }
  .library-patron-only-modal .library-patron-only-content h2 {
    margin: 0 0 9px;
    font-size: clamp(32px, 9vw, 48px);
    line-height: .98;
  }
  .library-patron-only-modal .library-patron-only-divider {
    width: clamp(142px, 42vw, 205px);
    margin: 0 auto clamp(18px, 4vw, 24px);
  }
  .library-patron-only-modal #libraryPatronOnlyCopy {
    max-width: 440px;
    margin: 0 auto 42px;
    font-size: clamp(18px, 4.5vw, 24px);
    line-height: 1.22;
  }
  .library-patron-only-modal .library-patron-only-status {
    max-width: 440px;
    margin: -24px auto 22px;
    font-size: clamp(14px, 3.4vw, 18px);
  }
  .library-patron-only-modal .library-patron-only-price {
    margin: 0 0 34px;
    font-size: clamp(32px, 7vw, 46px);
    line-height: 1;
  }
  .library-patron-only-modal .library-patron-only-actions {
    gap: 20px;
  }
  .library-patron-only-modal .library-patron-only-subscribe-wrap {
    --library-patron-only-btn-height: 62px;
    --library-patron-only-btn-font-size: clamp(22px, 4.8vw, 28px);
  }
  .library-patron-only-modal .library-patron-only-subscribe {
    min-width: 264px;
    padding: 0 32px;
  }
  .library-patron-only-modal .library-patron-only-cancel {
    font-size: clamp(18px, 4vw, 22px);
  }
}

.library-intro-close {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 16px;
  width: 20.8px;
  height: 20.8px;
  border: 0;
  border-radius: 50%;
  background: #414040;
  color: #f2f2f2;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 15.9px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.library-intro-close:hover {
  background: #4a4949;
}

.library-intro-image-wrap {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #202020;
}

.library-intro-image-wrap::after {
  content: none;
}

.library-intro-image-wrap.is-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(22, 22, 22, 0.35), rgba(74, 74, 74, 0.28)),
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.12), transparent 36%),
    linear-gradient(180deg, #353535, #202020);
}

.library-intro-image {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
}

.library-intro-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(18px, 2.8vw, 28px) clamp(28px, 4.2vw, 44px) 28px;
  background: radial-gradient(circle at 50% 36%, #303030 0%, #232323 78%, #181818 100%);
  color: #f2f2f2;
  text-align: left;
}

.library-intro-heading {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 200px;
  margin: 0 0 clamp(18px, 2.4vh, 26px);
  padding: 10px 42px 0;
  box-sizing: border-box;
  text-align: center;
}

.library-intro-heading-filigree {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: min(615px, 101.2%);
  max-width: none;
  height: 242px;
  object-fit: contain;
  opacity: 0.09;
  filter: none;
  pointer-events: none;
  user-select: none;
  transform: translate(-50%, calc(-43% - 15px));
}

.library-intro-copy h2 {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 15em;
  margin: 0;
  color: #f2f2f2;
  font-size: 35.2px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-align: center;
  transform: translateY(20px);
}

.library-intro-author {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 18em;
  margin: 26.6px 0 0;
  color: #f2f2f2;
  font-size: 25.2px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-align: center;
  transform: translateY(20px);
}

.library-intro-text {
  width: 100%;
  max-width: none;
  font-size: calc(clamp(17px, 1.6vw, 18px) - 1pt);
  line-height: 1.32;
  text-align: justify;
  text-justify: inter-word;
  transform: translateY(-44px);
}

.library-intro-text p {
  margin: 0 0 12px;
  text-align: justify;
}

.library-intro-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 7px 18px;
  width: 100%;
  margin: -36px 0 22px;
  padding-top: 0;
  color: rgba(242, 242, 242, 0.88);
  font-size: calc(clamp(15px, 1.35vw, 16px) - 1pt);
  line-height: 1.28;
}

.library-intro-meta[hidden] {
  display: none;
}

.library-intro-meta dt {
  margin: 0;
  color: rgba(214, 188, 130, 0.92);
  font-weight: 600;
  white-space: nowrap;
}

.library-intro-meta dd {
  min-width: 0;
  margin: 0;
  color: rgba(242, 242, 242, 0.88);
}

.library-intro-actions {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  margin-left: 2px;
}

.library-intro-ai-disclaimer {
  max-width: 430px;
  margin: 0;
  color: rgba(190, 190, 190, 0.68);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
}

.library-intro-enter-wrap.narralogue-button-frame {
  flex: 0 0 auto;
  --narralogue-button-frame-padding: 1px;
  --narralogue-button-width: 134px;
  --narralogue-button-height: 42px;
  --narralogue-button-font-size: clamp(17px, 1.24vw, 20px);
}

.library-intro-enter.narralogue-button-inner {
  min-width: 0;
  padding: 0 30px;
}

.library-intro-enter-label,
.library-intro-enter-loading {
  align-items: center;
  justify-content: center;
}

.library-intro-enter-label {
  display: inline-flex;
}

.library-intro-enter-loading {
  display: none;
  align-items: baseline;
  gap: 0;
}

.library-intro-enter.is-loading .library-intro-enter-label {
  display: none;
}

.library-intro-enter.is-loading .library-intro-enter-loading {
  display: inline-flex;
}

.library-intro-enter-dots {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  margin-left: 0;
  line-height: inherit;
}

.library-intro-enter-dots i {
  display: inline-block;
  font-style: normal;
  line-height: inherit;
  animation: libraryIntroEnterDot 1.05s ease-in-out infinite;
}

.library-intro-enter-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.library-intro-enter-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes libraryIntroEnterDot {
  0%,
  60%,
  100% {
    opacity: 0.28;
  }

  30% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .library-intro-enter-dots i {
    animation: none;
    opacity: 1;
  }
}

@media (min-width: 1440px) {
  .library-featured-shelf,
  .library-shelf-panel.library-saved-shelf {
    --library-wide-book-grid-width: min(88vw, 1555px);
    width: var(--library-wide-book-grid-width);
    margin-right: calc((100% - var(--library-wide-book-grid-width)) / 2);
    margin-left: calc((100% - var(--library-wide-book-grid-width)) / 2);
  }

  .library-featured-grid,
  .library-saved-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(14px, 1.25vw, 24px);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .library-menu-tier-badge {
    display: none !important;
  }

  .library-page .library-shell {
    width: min(100vw - 32px, 760px);
    padding-top: 52px;
  }

  .library-page .library-user-guide-shell {
    width: 100%;
    padding-top: 0;
  }

  .library-user-guide-layout {
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
    min-height: 500px;
  }

  .library-user-guide-nav {
    gap: 50px;
    padding: 44px 0 34px;
  }

  .library-user-guide-nav-item {
    padding: 0 24px;
    font-size: calc(clamp(20px, calc(2.1vw + 3pt), 23px) - 2pt);
  }

  .library-user-guide-content {
    padding: 0;
  }

  .library-user-guide-hero {
    min-height: clamp(280px, 40vw, 420px);
  }

  .library-user-guide-hero-copy {
    left: -16px;
    bottom: 138px;
  }

  .library-user-guide-getting-started-hero {
    min-height: clamp(260px, 42vw, 400px);
  }

  .library-user-guide-getting-started-hero-copy {
    left: clamp(20px, 3.5vw, 38px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .library-user-guide-article {
    width: 70%;
    margin: 24px auto 0;
  }

  .library-banner-copy {
    left: clamp(28px, 6vw, 58px);
    width: min(520px, 62vw);
  }

  .library-banner-copy h2 {
    margin-bottom: 12px;
    font-size: clamp(21px, 3.5vw, 33.6px);
  }

  .library-banner-copy p {
    font-size: clamp(10.5px, 1.75vw, 16.1px);
    line-height: 1.22;
  }

  .library-banner-status {
    height: 34px;
    min-width: 0;
    margin-top: 12px;
    padding: 0 22px;
    font-size: clamp(10.5px, 1.75vw, 16.1px);
  }

  .library-banner-status {
    font-size: var(--library-menu-patron-font-size);
  }

  .library-banner-cta-wrap.narralogue-button-frame {
    --narralogue-button-height: 34px;
    --narralogue-button-font-size: clamp(17px, 1.24vw, 20px);
    margin-top: 12px;
  }

  .library-banner-cta-link.narralogue-button-inner {
    min-width: 0;
    padding: 0 20px;
  }

  .library-featured-divider {
    gap: 10px;
    margin-top: 30px;
  }

  .library-featured-divider img {
    width: clamp(72px, 15vw, 112px);
  }

  .library-featured-divider h2 {
    font-size: clamp(10.5px, 1.75vw, 16.1px);
  }

  .library-featured-shelf {
    width: min(100vw - 48px, 760px);
    margin-top: 28px;
  }

  .library-featured-shelf h2 {
    margin-bottom: 24px;
    font-size: clamp(10.5px, 1.75vw, 16.1px);
  }

  .library-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .library-featured-copy {
    gap: 22px;
    padding: 42px 30px 34px;
  }

  .library-featured-title {
    font-size: clamp(26px, 4vw, 38px);
  }

  .library-featured-author {
    font-size: clamp(16px, 2.5vw, 22px);
  }

  .library-top-menu-track {
    min-height: 75.2px;
    gap: 14.4px;
    padding: 8px 14.4px 7.2px;
    min-width: 0;
  }

  .library-top-menu {
    --library-top-menu-visible-height: 58.2px;
    --library-menu-icon-height: 20.8px;
    --library-menu-icon-stage-width: 43.2px;
    --library-menu-item-width: 51.2px;
    --library-menu-patron-width: 150px;
    --library-menu-patron-height: 40px;
    --library-menu-patron-font-size: clamp(12px, 2.35vw, 15px);
    --library-menu-notification-circle-size: 41px;
    --library-menu-notification-icon-height: 21px;
    --library-menu-account-size: 43.2px;
    --library-menu-account-font-size: 25.2px;
    --library-menu-account-radius: 10.8px;
    overflow-x: hidden;
  }

  .library-top-menu-logo {
    width: clamp(132px, 28vw, 184px);
    transform: translateY(-8px);
  }

  .library-top-menu-nav,
  .library-menu-account-menu {
    display: none;
  }

  .library-top-menu-actions {
    margin-left: 0;
    gap: 12px;
  }

  .library-mobile-menu-toggle {
    position: relative;
    top: -10px;
    display: flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .library-mobile-menu {
    position: fixed;
    top: 58.2px;
    left: auto;
    right: 14.4px;
    z-index: 49;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: min(52vw, 320px);
    min-width: 240px;
    max-height: calc(100vh - 58.2px);
    padding: 8px 14px 12px;
    overflow-y: auto;
    background: rgba(3, 4, 7, 0.96);
    border: 1px solid rgba(184, 150, 84, 0.28);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.48);
    animation: library-mobile-menu-glide 0.22s ease-out both;
  }

  .library-mobile-menu.is-closing {
    pointer-events: none;
    animation: library-mobile-menu-glide-close 0.22s ease-in both;
  }

  .library-mobile-menu[hidden] {
    display: none;
  }

  .library-mobile-menu-item {
    display: block;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #c7c7c7;
    font-size: 18px;
    line-height: 1.15;
    text-decoration: none;
  }

  .library-mobile-menu-item:last-child {
    border-bottom: 0;
  }

  .library-mobile-menu-item.active,
  .library-mobile-menu-item:hover,
  .library-mobile-menu-item:focus-visible {
    color: #d2ad66;
  }

  .library-menu-item {
    font-size: 9.6px;
  }

  .library-menu-patron {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    padding: 0 12px;
  }

  .library-shelf-panel {
    width: min(100vw - 48px, 760px);
    margin-top: 44px;
  }

  .library-saved-grid,
  .library-sigils-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .landing .title-box {
    min-height: 188px;
  }

  .landing .filigree {
    width: min(390px, 70vw);
    transform: translate(-50%, 8%);
  }

  .landing .library {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 28px;
    max-width: min(720px, calc(100vw - 64px));
  }

  .landing .book-card {
    width: 82%;
  }

  .landing.library-page .library {
    margin-top: 0;
  }

  .library-intro-modal {
    width: min(920px, calc(100vw - 36px));
    height: min(560px, calc(100vh - 44px));
    min-height: 0;
    grid-template-columns:
      minmax(0, min(373.33px, calc(66.667vh - 29.33px)))
      minmax(0, 1fr);
  }

  .library-intro-copy {
    padding: 24px 34px 26px 28px;
  }

  .library-intro-heading {
    min-height: 190px;
    margin-bottom: 20px;
    padding: 8px 38px 0;
  }

  .library-intro-heading-filigree {
    width: min(523px, 103.5%);
    height: 207px;
  }

  .library-intro-copy h2 {
    font-size: 28.8px;
    letter-spacing: 0.15em;
  }

  .library-intro-author {
    margin-top: 32px;
    font-size: 19.2px;
    letter-spacing: 0.07em;
  }

  .library-intro-enter-wrap.narralogue-button-frame {
    --narralogue-button-width: 124px;
    --narralogue-button-height: 34px;
    --narralogue-button-font-size: clamp(17px, 1.24vw, 20px);
  }

  .library-intro-enter.narralogue-button-inner {
    padding: 0 22px;
  }
}

@media (max-width: 520px) {
  .library-request-shell {
    width: min(100vw - 24px, 560px);
  }

  .library-request-heading,
  .library-membership-title,
  .library-account-heading {
    gap: 8px;
  }

  .library-request-heading img,
  .library-membership-title img,
  .library-account-heading img {
    width: clamp(48px, 18vw, 74px);
  }

  .library-request-heading h1,
  .library-membership-title h1,
  .library-account-heading h1 {
    font-size: clamp(22px, 7vw, 30px);
  }

  .library-request-panel {
    padding: 22px 17px 25px;
  }

  .library-request-field input,
  .library-request-field select,
  .library-request-field textarea {
    font-size: 16px;
  }

  .library-page .library-shell {
    width: min(100vw - 24px, 560px);
    padding-top: 42px;
  }

  .library-page .library-user-guide-shell {
    width: 100%;
    padding-top: 0;
  }

  .library-user-guide-layout {
    display: none;
  }

  .landing.library-page.library-section-user-guide {
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: scroll;
  }

  .library-section-user-guide .library-content-transition {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .library-section-user-guide .library-user-guide-shell {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .library-user-guide-mobile-accordion {
    display: block;
    width: 100%;
    background: #030407;
  }

  .landing.library-page.library-section-user-guide .library-user-guide-mobile-footer {
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 0;
    height: auto;
    max-height: 141px;
    margin: auto auto 0;
    padding: 18px 14px 45px;
    font-size: 13px;
    overflow: hidden;
  }

  .library-user-guide-mobile-item {
    margin: 0;
  }

  .library-user-guide-mobile-trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 18px 46px;
    border: 0;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    color: #777a80;
    background: transparent;
    cursor: pointer;
    font-family: "EB Garamond", Georgia, serif;
    font-size: calc(clamp(21px, calc(5vw + 3pt), 26px) - 2pt);
    line-height: 1.2;
    text-align: center;
    transition: color 0.18s ease, transform 0.18s ease;
  }

  .library-user-guide-mobile-trigger::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 22px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #777a80;
    transform: translateY(-50%);
    transition: border-color 0.18s ease, transform 180ms ease;
  }

  .library-user-guide-mobile-trigger:hover,
  .library-user-guide-mobile-trigger:focus-visible {
    color: #f2f2f2;
    transform: translateY(-1.6px) scale(1.02);
  }

  .library-user-guide-mobile-trigger:hover::before,
  .library-user-guide-mobile-trigger:focus-visible::before {
    border-left-color: #f2f2f2;
  }

  .library-user-guide-mobile-trigger.is-open {
    color: #b89654;
    border-color: transparent;
    transform: translateY(-1.6px);
  }

  .library-user-guide-mobile-trigger.is-open::before {
    border-left-color: #b89654;
    transform: translateY(-50%) rotate(90deg);
  }

  .library-user-guide-mobile-trigger:focus-visible {
    outline: 1px solid rgba(242, 242, 242, 0.58);
    outline-offset: -7px;
  }

  .library-user-guide-mobile-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: #030407;
    transition:
      max-height 280ms ease,
      opacity 220ms ease;
  }

  .library-user-guide-mobile-panel.is-open {
    opacity: 1;
  }

  .library-user-guide-mobile-placeholder {
    padding: 34px 24px 42px;
    color: rgba(242, 242, 242, 0.74);
    text-align: center;
  }

  .library-user-guide-mobile-placeholder p {
    margin: 0;
    font-size: clamp(18px, 5vw, 22px);
    line-height: 1.35;
  }

  .library-user-guide-hero {
    width: 100%;
    min-height: 220px;
    margin: 0;
    aspect-ratio: 16 / 8.5;
  }

  .library-user-guide-hero-copy {
    left: 22px;
    bottom: clamp(28px, 8vw, 42px);
    width: min(300px, calc(100% - 44px));
  }

  .library-user-guide-getting-started-hero-copy {
    left: 18px;
    top: auto;
    bottom: 18px;
    width: max-content;
    max-width: calc(100% - 36px);
    padding: 16px 18px;
    transform: none;
  }

  .library-user-guide-hero-title {
    font-size: calc(clamp(24px, 7.6vw, 34px) - 4pt);
  }

  .library-user-guide-article {
    width: calc(100% - 44px);
    margin: 22px auto 0;
    padding-bottom: 36px;
  }

  .library-user-guide-faq-list {
    width: calc(100% - 44px);
    margin: 30px auto 0;
  }

  .library-user-guide-faq-hero-copy {
    left: 16px;
    width: min(300px, calc(100% - 32px));
    padding: 12px 14px;
    transform: translateY(-50%);
  }

  .library-user-guide-content .library-user-guide-faq-hero-text,
  .library-user-guide-faq-hero-text {
    font-size: clamp(18px, 5vw, 22px);
  }

  .library-user-guide-faq-trigger {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    padding: 16px 2px;
    font-size: clamp(18px, 5vw, 22px);
  }

  .library-user-guide-faq-answer-inner {
    padding: 0 2px 28px 30px;
  }

  .library-user-guide-faq-answer p {
    font-size: clamp(17px, 4.7vw, 20px);
  }

  .library-banner-carousel {
    width: 100%;
  }

  .library-banner-copy {
    left: 20px;
    width: min(300px, 72vw);
    transform: translateY(calc(-42% + 40px));
  }

  .library-banner-copy h2 {
    margin-bottom: 8px;
    font-size: clamp(16.8px, 4.9vw, 23.8px);
  }

  .library-banner-copy p {
    font-size: calc(clamp(8.4px, 2.59vw, 11.2px) + 2pt);
    line-height: 1.18;
  }

  .library-banner-status {
    height: 30px;
    min-width: 0;
    margin-top: 8px;
    padding: 0 16px;
    font-size: clamp(8.4px, 2.59vw, 11.2px);
  }

  .library-banner-status {
    font-size: var(--library-menu-patron-font-size);
  }

  .library-banner-cta-wrap.narralogue-button-frame {
    --narralogue-button-height: 30px;
    --narralogue-button-font-size: clamp(17px, 1.24vw, 20px);
    margin-top: 8px;
  }

  .library-banner-cta-link.narralogue-button-inner {
    min-width: 0;
    padding: 0 16px;
  }

  .library-featured-divider {
    gap: 8px;
    margin-top: 24px;
  }

  .library-featured-divider img {
    width: clamp(48px, 18vw, 74px);
  }

  .library-featured-divider h2 {
    font-size: clamp(8.4px, 2.59vw, 11.2px);
  }

  .library-featured-shelf {
    width: min(100vw - 32px, 360px);
    margin-top: 24px;
  }

  .library-featured-shelf h2 {
    margin-bottom: 18px;
    font-size: clamp(8.4px, 2.59vw, 11.2px);
  }

  .library-featured-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .library-featured-copy {
    gap: 18px;
    padding: 34px 24px 28px;
  }

  .library-featured-title {
    font-size: clamp(24px, 9vw, 34px);
  }

  .library-featured-author {
    font-size: clamp(15px, 5vw, 21px);
  }

  .library-banner-dots {
    bottom: 8px;
    gap: 6px;
  }

  .library-banner-dot {
    width: 8px;
    height: 8px;
  }

  .library-top-menu-track {
    min-height: 65.6px;
    gap: 9px;
    padding: 6.4px 8px 5.6px;
    min-width: 0;
  }

  .library-top-menu {
    --library-top-menu-visible-height: 48.6px;
    --library-menu-icon-height: 17.6px;
    --library-menu-icon-stage-width: 38.4px;
    --library-menu-item-width: 46.4px;
    --library-menu-patron-width: 112px;
    --library-menu-patron-height: 34px;
    --library-menu-patron-font-size: clamp(10px, 3.1vw, 12px);
    --library-menu-notification-circle-size: 36px;
    --library-menu-notification-icon-height: 18px;
    --library-menu-account-size: 37.8px;
    --library-menu-account-font-size: 21.6px;
    --library-menu-account-radius: 9px;
  }

  .library-top-menu-logo {
    width: clamp(96px, 30vw, 136px);
    transform: translateY(-7px);
  }

  .library-top-menu-actions {
    gap: 6px;
  }

  .library-mobile-menu-toggle {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
  }

  .library-mobile-menu-toggle-line {
    width: 27px;
    height: 3.2px;
  }

  .library-mobile-menu {
    right: 8px;
    width: min(54vw, 280px);
    min-width: 190px;
    top: 48.6px;
    max-height: calc(100vh - 48.6px);
    padding: 7px 12px 10px;
  }

  .library-mobile-menu-item {
    padding: 11px 6px;
    font-size: 17px;
  }

  .library-menu-item {
    gap: 4px;
    font-size: 8.4px;
  }

  .library-menu-patron {
    gap: 7px;
    padding: 0 8px;
  }

  .library-subscribe {
    min-width: 86px;
    min-height: 34px;
    margin-top: 4px;
    padding: 6px 18px;
    font-size: 16px;
  }

  .library-shelf-tabs {
    gap: clamp(36px, 12vw, 72px);
    margin-top: 48px;
  }

  .library-shelf-tab {
    font-size: clamp(22px, 7vw, 28px);
  }

  .library-shelf-panel {
    width: min(100vw - 32px, 360px);
    margin-top: 36px;
  }

  .library-saved-grid,
  .library-sigils-grid,
  .library-wisps-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .landing .container {
    padding: 6px 10px 44px;
  }

  .landing .title-box {
    width: min(100vw - 20px, 480px);
    min-height: 148px;
    padding-top: 0;
  }

  .landing .logo {
    letter-spacing: 0.09em;
    transform: translateY(18px);
  }

  .landing .filigree {
    width: min(300px, 82vw);
    transform: translate(-50%, 8%);
    opacity: 0.13;
  }

  .landing .hero-divider {
    width: min(280px, calc(100vw - 54px));
    gap: 9px;
    margin-top: 0;
  }

  .landing .tagline-box {
    margin-top: 12px;
  }

  .landing .hero-cta {
    margin-top: 16px;
    padding: 9px 22px;
    letter-spacing: 0.07em;
    font-size: 12px;
  }

  .landing .nav {
    gap: 17px;
    margin-top: 28px;
    font-size: 15px;
  }

  .landing .library {
    grid-template-columns: 1fr;
    max-width: min(234px, calc(100vw - 40px));
    gap: 18px;
  }

  .landing .book-card {
    width: 100%;
  }

  .library-page .intro-welcome {
    margin-bottom: 44px;
  }

  .library-page .library-more {
    margin: 40px 0 24px;
  }

  .library-intro-overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding: 18px 12px;
  }

  .library-intro-modal {
    width: min(420px, calc(100vw - 24px));
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .library-intro-image-wrap {
    min-height: 0;
    aspect-ratio: 2 / 3;
    padding: 0;
  }

  .library-intro-image-wrap::after {
    content: none;
  }

  .library-intro-image {
    width: 100%;
    height: 100%;
    max-height: none;
  }

  .library-intro-copy {
    padding: 20px 22px 24px;
  }

  .library-intro-heading {
    min-height: 155px;
    margin-bottom: 18px;
    padding: 6px 30px 0;
  }

  .library-intro-heading-filigree {
    width: min(408px, 110.4%);
    height: 184px;
    transform: translate(-50%, calc(-40% - 15px));
  }

  .library-intro-copy h2 {
    margin: 0;
    font-size: 24px;
    letter-spacing: 0.12em;
  }

  .library-intro-author {
    margin-top: 24px;
    font-size: 17.6px;
    letter-spacing: 0.06em;
  }

  .library-intro-text {
    max-width: 100%;
    font-size: calc(17px - 1pt);
    line-height: 1.36;
    transform: translateY(-38px);
  }

  .library-intro-meta {
    grid-template-columns: 1fr;
    gap: 3px;
    margin: -30px 0 20px;
    padding-top: 0;
    font-size: calc(15px - 1pt);
  }

  .library-intro-meta dt {
    white-space: normal;
  }

  .library-intro-meta dd {
    margin-bottom: 7px;
  }

  .library-intro-actions {
    gap: 8px;
    margin-top: 18px;
  }

  .library-intro-enter-wrap.narralogue-button-frame {
    --narralogue-button-width: 106px;
    --narralogue-button-height: 30px;
    --narralogue-button-font-size: clamp(17px, 1.24vw, 20px);
  }

  .library-intro-enter.narralogue-button-inner {
    padding: 0 16px;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .library-banner-carousel {
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  .library-banner-copy {
    top: auto;
    bottom: 30px;
    width: min(326px, 78vw);
    padding-top: 16px;
    padding-right: 20px;
    padding-bottom: 16px;
    transform: none;
  }

  .library-banner-copy::before {
    inset: 0 -16px 0 -18px;
  }

  .library-banner-copy p {
    font-size: calc(clamp(11px, 3.25vw, 13.4px) + 2pt);
    line-height: 1.24;
  }

  .library-banner-cta-wrap.narralogue-button-frame {
    --narralogue-button-font-size: calc(clamp(17px, 1.24vw, 20px) - 2pt);
    margin-top: 20px;
  }

  .library-banner-slide img {
    object-fit: cover;
    object-position: center center;
  }

  .library-banner-dots {
    bottom: 9px;
  }

  .library-featured-shelf,
  .library-shelf-panel {
    width: min(100vw - 28px, 390px);
  }

  .library-shelf-tabs {
    gap: clamp(34px, 13vw, 66px);
    margin-top: 42px;
  }

  .library-shelf-tab {
    font-size: clamp(20px, 6vw, 26px);
  }

  .library-featured-grid,
  .library-saved-grid,
  .library-sigils-grid,
  .library-wisps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
  }

  .library-featured-grid .book-cover,
  .library-saved-grid .book-cover {
    --book-title-bottom: clamp(36px, 10vw, 48px);
    --book-title-author-gap: 5px;
  }

  .library-featured-grid .book-title-overlay,
  .library-saved-grid .book-title-overlay {
    padding: 0 12px;
    font-size: clamp(15px, 4.8vw, 20px);
  }

  .library-featured-grid .book-author-overlay,
  .library-saved-grid .book-author-overlay {
    padding: 0 12px;
    font-size: clamp(10px, 3.1vw, 13px);
  }

  .library-featured-grid .book-year,
  .library-saved-grid .book-year {
    margin-top: 8px;
    font-size: calc(11px + 2pt);
  }

  .library-featured-grid .book-tone,
  .library-saved-grid .book-tone {
    font-size: calc(9px + 2pt);
  }

  .landing.library-page .library-saved-grid .book-progress {
    font-size: calc(10px + 1pt);
  }

  .landing.library-page .library-saved-grid .book-overall-progress {
    font-size: calc(10px + 1pt);
  }
}

@media (orientation: landscape) {
  .library-banner-carousel {
    aspect-ratio: 16 / 6;
  }
}

/* ===== LIBRARY BOOK-ENTRY AUTH ===== */
body.library-auth-open {
  overflow: hidden;
}

.library-private-section:not(.library-private-access-granted) .library-content-transition {
  visibility: hidden;
}

.library-intro-status {
  width: min(100%, 420px);
  margin: 0 auto 12px;
  color: #8c2f2a;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.35;
  text-align: center;
}

.library-entry-status {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  z-index: 6300;
  width: min(92vw, 520px);
  margin: 0;
  padding: 13px 18px;
  border: 1px solid rgba(151, 91, 70, 0.46);
  border-radius: 10px;
  background: rgba(255, 249, 238, 0.98);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  color: #722f29;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.library-entry-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.library-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 6200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(18px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}

.library-auth-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.library-auth-overlay .auth-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(16, 52, 45, 0.3), transparent 46%),
    rgba(0, 0, 0, 0.66);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.library-auth-panel {
  position: relative;
  isolation: isolate;
  z-index: 1;
  width: min(92vw, 390px);
  max-height: calc(100svh - 36px);
  overflow: auto;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(14, 48, 43, 0.96), rgba(2, 10, 12, 0.98));
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.62);
  color: #f6efe2;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.24s ease, transform 0.24s ease;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.library-auth-panel::-webkit-scrollbar {
  display: none;
}

.library-auth-overlay.is-open .library-auth-panel,
.library-auth-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.library-auth-panel .auth-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(24px, 4vw, 34px) clamp(22px, 5vw, 34px);
  text-align: center;
}

.library-auth-panel [hidden] {
  display: none !important;
}

.library-auth-panel .auth-title {
  margin: 0;
  color: #fff9ef;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.08;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.48);
}

.library-auth-panel .auth-divider {
  display: block;
  width: min(70%, 210px);
  height: auto;
  margin: 11px auto 24px;
  opacity: 0.9;
  pointer-events: none;
  user-select: none;
}

.library-auth-panel .auth-turnstile-host {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 300px;
  height: 65px;
  overflow: hidden;
  pointer-events: none;
}

.library-auth-panel .auth-google {
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: radial-gradient(
    circle at 50% 36%,
    rgba(96, 96, 96, 0.98) 0%,
    rgba(73, 73, 73, 0.98) 78%,
    rgba(54, 54, 54, 0.98) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.library-auth-panel .auth-google:hover,
.library-auth-panel .auth-google:focus-visible {
  outline: 2px solid rgba(242, 227, 195, 0.7);
  outline-offset: 3px;
}

.library-auth-panel .auth-google-mark {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
}

.library-auth-panel .auth-or {
  margin: 14px 0 10px;
  color: #fff9ef;
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1;
}

.library-auth-panel .auth-fields {
  overflow: hidden;
  border: 1px solid rgba(242, 242, 242, 0.38);
  border-radius: 7px;
  background: rgba(30, 30, 30, 0.92);
  text-align: left;
}

.library-auth-panel .auth-fields input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  display: block;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  color: #f2f2f2;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.2;
}

.library-auth-panel .auth-password-row {
  position: relative;
  border-top: 1px solid rgba(242, 242, 242, 0.24);
}

.library-auth-panel .auth-password-row input {
  padding-right: 44px;
}

.library-auth-panel .auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(242, 242, 242, 0.68);
  cursor: pointer;
  touch-action: none;
  transform: translateY(-50%);
}

.library-auth-panel .auth-password-toggle:focus-visible {
  outline: 1px solid rgba(242, 242, 242, 0.65);
  outline-offset: 2px;
}

.library-auth-panel .auth-password-eye {
  position: relative;
  width: 17px;
  height: 10px;
  display: block;
  border: 1.4px solid currentColor;
  border-radius: 50% / 62%;
}

.library-auth-panel .auth-password-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.library-auth-panel .auth-fields input::placeholder {
  color: rgba(242, 242, 242, 0.58);
}

.library-auth-panel .auth-fields input:focus {
  outline: 2px solid rgba(242, 227, 195, 0.72);
  outline-offset: -2px;
}

.library-auth-panel .auth-legal {
  margin: 18px 0 22px;
  color: #fff9ef;
  font-size: 15px;
  line-height: 1.35;
}

.library-auth-panel .auth-legal a {
  color: inherit;
  text-underline-offset: 3px;
}

.library-auth-panel .auth-submit-wrap {
  display: flex;
  justify-content: center;
}

.library-auth-panel .auth-submit-wrap .narralogue-button-frame {
  --narralogue-button-frame-padding: 1px;
  --narralogue-button-width: 128px;
  --narralogue-button-height: 40px;
  --narralogue-button-font-size: 18px;
}

.library-auth-panel .auth-text-action {
  border: 0;
  background: transparent;
  color: #fff9ef;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: center;
}

.library-auth-panel .auth-forgot {
  display: block;
  margin: 18px auto 0;
  font-size: 16px;
}

.library-auth-panel .auth-text-action:hover,
.library-auth-panel .auth-text-action:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
  outline: none;
}

.library-auth-panel .auth-otp-copy {
  margin: 4px 0 18px;
  color: #fff9ef;
  font-size: 17px;
  line-height: 1.35;
}

.library-auth-panel .auth-otp-copy span {
  overflow-wrap: anywhere;
}

.library-auth-panel .auth-otp-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin: 0 0 18px;
  border: 1px solid rgba(243, 234, 218, 0.72);
  border-radius: 6px;
  background: #f2f2f2;
  color: #2e2b23;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: 20px;
  letter-spacing: 0.28em;
  text-align: center;
}

.library-auth-panel .auth-otp-input:focus {
  outline: 2px solid rgba(243, 234, 218, 0.7);
  outline-offset: 2px;
}

.library-auth-panel .auth-otp-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  font-size: 16px;
}

.library-auth-panel button[disabled],
.library-auth-panel .auth-google[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.library-auth-panel .auth-status {
  min-height: 19px;
  margin: 10px 0 0;
  color: #fff9ef;
  text-align: center;
  font-size: 14px;
  line-height: 1.3;
}

@media (min-width: 521px) {
  .library-auth-panel {
    transform: translateY(12px) scale(0.88);
  }

  .library-auth-overlay.is-open .library-auth-panel,
  .library-auth-panel.is-open {
    transform: translateY(0) scale(0.9);
  }
}

@media (max-width: 520px) {
  .library-auth-overlay {
    align-items: center;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .library-auth-panel {
    width: min(88vw, 330px);
    max-height: calc(100svh - 24px);
  }

  .library-auth-panel .auth-content {
    padding: 22px 20px;
  }

  .library-auth-panel .auth-title {
    font-size: clamp(23px, 7vw, 29px);
  }

  .library-auth-panel .auth-divider {
    margin-bottom: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .library-auth-overlay,
  .library-auth-panel,
  .library-entry-status {
    transition: none;
  }
}

/* ===== FADE IN ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes landingSpin {
  to { transform: rotate(360deg); }
}

@keyframes libraryIntroModalIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes libraryIntroModalOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes librarySavedItemIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes libraryShelfPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
