@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400&display=swap');
:root {
  --ink: #f7f1f3;
  --muted: #b8aeb3;
  --wine: #a94368;
  --wine2: #d86b8e;
  --bg: #100c0f;
  --panel: #191217;
  --line: #33242d;
  --paper: #f6efe4;
  --paper2: #efe4d6;
  --paperInk: #31272b;
  --gold: #c79b6d
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: radial-gradient(circle at 50% -10%, #3a1727 0, #171015 35%, #0e0b0d 70%);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif
}

.hidden {
  display: none !important
}

.no-scroll {
  overflow: hidden
}

header {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: auto;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700
}

.brand span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c66887;
  border-radius: 50%;
  font: italic 22px 'Playfair Display';
  margin-right: 8px
}

.privacy {
  font-size: 13px;
  color: #aa9ca3
}

.hero {
  text-align: center;
  max-width: 900px;
  margin: auto;
  padding: 95px 24px 80px
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  color: #d885a1;
  font-weight: 700
}

.hero h1 {
  font: 600 clamp(48px, 7vw, 82px)/1.03 'Playfair Display';
  margin: 20px 0 24px;
  letter-spacing: -2px
}

.hero h1 em {
  color: #d96d91
}

.hero p {
  max-width: 660px;
  margin: 0 auto 35px;
  color: #c7bbc0;
  font-size: 18px;
  line-height: 1.7
}

.primary, .generate {
  background: linear-gradient(135deg, #b54c71, #7f294b);
  box-shadow: 0 15px 45px rgba(169, 67, 104, .24);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 16px 27px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px
}

.trust {
  margin-top: 30px;
  display: flex;
  gap: 24px;
  justify-content: center;
  color: #8f8188;
  font-size: 12px
}

.resume {
  display: block;
  margin: 25px auto 0;
  background: transparent;
  border: 1px solid #75465a;
  color: #e2bdca;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer
}

.creator {
  max-width: 1020px;
  margin: 0 auto 100px;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(31, 21, 27, .97), rgba(20, 15, 18, .99));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28)
}

.section-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px
}

.section-head.second {
  margin-top: 48px
}

.section-head>span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #6e3b50;
  display: grid;
  place-items: center;
  color: #d36d90;
  font-size: 12px;
  flex: none
}

.section-head h2 {
  font: 600 30px 'Playfair Display';
  margin: 0 0 5px
}

.section-head p {
  margin: 0;
  color: #91848b;
  font-size: 13px
}

.character-grid, .grid {
  display: grid;
  gap: 18px
}

.character-grid, .two {
  grid-template-columns: 1fr 1fr
}

.character-card {
  background: linear-gradient(145deg, #171014, #100c0f);
  border: 1px solid #3a2932;
  border-radius: 18px;
  padding: 20px
}

.character-card b, .field-title {
  color: #d8cdd2;
  font-size: 11px;
  letter-spacing: 1.5px
}

.compact {
  margin-top: 18px
}

label {
  display: block;
  color: #d8cdd2;
  font-size: 12px;
  font-weight: 700
}

input, textarea, select {
  width: 100%;
  margin-top: 9px;
  background: #100c0f;
  color: #eee3e7;
  border: 1px solid #3a2932;
  border-radius: 12px;
  padding: 14px 15px;
  font: inherit;
  outline: none;
  transition: .2s
}

textarea {
  height: 145px;
  resize: vertical;
  line-height: 1.55
}

.character-card textarea {
  background: #0e0a0c;
  border-color: #302129
}

.premise {
  height: 125px
}

input:focus, textarea:focus, select:focus {
  border-color: #a94368;
  box-shadow: 0 0 0 3px rgba(169, 67, 104, .1)
}

.field-title {
  margin: 24px 0 12px;
  font-weight: 700
}

.field-title small {
  color: #756970;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 7px;
  font-weight: 400
}

.moods {
  display: flex;
  gap: 9px;
  flex-wrap: wrap
}

.moods button {
  border: 1px solid #49313d;
  background: #120d10;
  color: #bcaeb5;
  padding: 10px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: .18s
}

.moods button:hover, .moods button.active {
  background: #6f2946;
  border-color: #b65377;
  color: #fff;
  box-shadow: 0 6px 20px rgba(169, 67, 104, .16)
}

.custom-style {
  margin-top: 18px
}

.generate {
  display: block;
  margin: 36px auto 0;
  padding: 17px 35px
}

.fine {
  text-align: center;
  color: #71656b;
  font-size: 11px;
  margin-top: 17px
}

footer {
  max-width: 1180px;
  margin: auto;
  padding: 30px 28px 45px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  display: flex;
  justify-content: space-between;
  color: #6f6268;
  font-size: 12px
}

.loading {
  position: fixed;
  inset: 0;
  background: rgba(12, 8, 10, .94);
  backdrop-filter: blur(12px);
  display: grid;
  place-content: center;
  text-align: center;
  z-index: 50
}

.writing-card {
  width: min(500px, 88vw)
}

.quill {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid #a94368;
  display: grid;
  place-items: center;
  margin: auto;
  font: italic 38px 'Playfair Display';
  animation: pulse 1.5s infinite
}

.progress {
  height: 3px;
  background: #302027;
  border-radius: 5px;
  margin: 30px 0 24px;
  overflow: hidden
}

.progress i {
  display: block;
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, #87304f, #e0789b);
  transition: width 1.2s
}

.loading h3 {
  font: 30px 'Playfair Display';
  margin: 0 0 8px
}

.loading p {
  color: #9d8e95
}

.dots b {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #a94368;
  border-radius: 50%;
  margin: 12px 3px;
  animation: blink 1.2s infinite
}

.dots b:nth-child(2) {
  animation-delay: .2s
}

.dots b:nth-child(3) {
  animation-delay: .4s
}

@keyframes pulse {
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(169, 67, 104, .35)
  }
}

@keyframes blink {
  50% {
    opacity: .25
  }
}

.reader {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: radial-gradient(circle at top, #34202a, #120e10 58%);
  overflow: auto;
  padding: 25px 28px 45px
}

.reader-close {
  position: fixed;
  right: 22px;
  top: 18px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #5a424d;
  background: #181114;
  color: #d8cdd2;
  font-size: 26px;
  cursor: pointer
}

.reader-top {
  width: min(1440px, 94vw);
  margin: 0 auto 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 55px;
  color: #cbbdc3
}

.reader-top small {
  letter-spacing: 2px;
  color: #a7647c
}

.reader-top h2 {
  font: 600 25px 'Playfair Display';
  margin: 4px 0
}

.reader-top select {
  width: auto;
  min-width: 180px;
  background: #181114;
  margin: 0
}

.book-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px
}

.book {
  width: min(1440px, 88vw);
  height: min(76vh, 820px);
  min-height: 610px;
  display: grid;
  grid-template-columns: 1fr 12px 1fr;
  filter: drop-shadow(0 35px 60px rgba(0, 0, 0, .55));
  perspective: 1200px
}

.page {
  position: relative;
  color: var(--paperInk);
  overflow: hidden;
  padding: 60px 66px 48px;
  background: linear-gradient(90deg, var(--paper) 0%, #fbf5eb 85%, #e8dccd 100%);
  box-shadow: inset 0 0 45px rgba(80, 55, 35, .05)
}

.left-page {
  border-radius: 8px 0 0 8px
}

.right-page {
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, #e8dccd 0%, #fbf5eb 15%, var(--paper) 100%)
}

.spine {
  background: linear-gradient(90deg, rgba(54, 37, 29, .18), rgba(255, 255, 255, .2), rgba(54, 37, 29, .18));
  box-shadow: 0 0 15px rgba(30, 15, 10, .25);
  z-index: 2
}

.page-text {
  height: 100%;
  overflow: hidden;
  font: 16.5px/1.78 'Libre Baskerville', Georgia, serif;
  white-space: pre-wrap
}

.page-text.chapter-start h3 {
  font: 600 34px 'Playfair Display';
  text-align: center;
  margin: 40px 0 32px
}

.page-text.title-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center
}

.page-text.title-page h1 {
  font: 600 45px/1.1 'Playfair Display';
  margin: 0 0 18px
}

.page-text.title-page p {
  font: italic 16px 'Libre Baskerville';
  color: #876b70
}

.page-num {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font: 12px Georgia;
  color: #9b8c82
}

.page-arrow {
  width: 46px;
  height: 62px;
  border-radius: 999px;
  border: 1px solid #55404a;
  background: #1a1216;
  color: #d6c4cb;
  font-size: 35px;
  cursor: pointer
}

.page-arrow:disabled {
  opacity: .2;
  cursor: default
}

.reader-bottom {
  width: min(1440px, 88vw);
  margin: 15px auto 0;
  display: flex;
  justify-content: space-between;
  color: #89767f;
  font-size: 12px
}

.reader-bottom button {
  border: 0;
  background: transparent;
  color: #a98b98;
  cursor: pointer
}

.continue-panel {
  width: min(calc(1440px * var(--reader-scale, 1)), calc(100vw - 96px));
  max-width: 100%;
  margin: 35px auto 10px;
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 850px) {
  .continue-panel {
    width: 86vw;
  }
}

.continue-panel h3 {
  font: 600 32px 'Playfair Display';
  margin: 8px 0
}

.continue-panel>p {
  color: #9f8f96
}

.endmark {
  color: #c96b8c;
  font-size: 22px
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0
}

.choices button {
  min-height: 112px;
  text-align: left;
  padding: 17px;
  border-radius: 14px;
  border: 1px solid #4a3440;
  background: #1b1317;
  color: #e5d9de;
  cursor: pointer
}

.choices button:hover {
  border-color: #a94368;
  transform: translateY(-2px)
}

.choices small {
  display: block;
  color: #b65b7b;
  letter-spacing: 1px;
  margin-bottom: 8px
}

.choices span {
  line-height: 1.45
}

.own {
  display: flex;
  gap: 10px
}

.own input {
  margin: 0;
  background: #171014
}

.own button {
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  background: #8e3556;
  color: #fff;
  font-weight: 700;
  cursor: pointer
}

@media(max-width:850px) {
  .character-grid, .two {
    grid-template-columns: 1fr
  }

  .creator {
    margin: 0 14px 70px;
    padding: 30px 22px
  }

  .privacy {
    display: none
  }

  .reader {
    padding: 15px 8px
  }

  .reader-top {
    padding: 0 48px 0 10px
  }

  .reader-top select {
    display: none
  }

  .book {
    width: 86vw;
    height: 76vh;
    min-height: 560px;
    grid-template-columns: 1fr
  }

  .left-page {
    display: none
  }

  .spine {
    display: none
  }

  .right-page {
    border-radius: 7px;
    padding: 42px 34px
  }

  .choices {
    grid-template-columns: 1fr
  }

  .own {
    flex-direction: column
  }

  .own button {
    padding: 14px
  }

  .page-arrow {
    width: 38px
  }

  .hero {
    padding: 70px 20px
  }

  .hero h1 {
    font-size: 49px
  }
}

/* V3.2 book polish */
.page-text.chapter-start h3 {
  margin: 54px 0 38px
}

.book-shell {
  gap: 7px
}

.page-arrow {
  width: 38px;
  height: 54px;
  border-color: rgba(199, 155, 109, .24);
  background: rgba(26, 18, 22, .72);
  color: #bdaab2;
  font-size: 29px;
  opacity: .78;
  transition: opacity .18s, border-color .18s, transform .18s;
}

.page-arrow:hover:not(:disabled) {
  opacity: 1;
  border-color: rgba(199, 155, 109, .48);
  transform: scale(1.04);
}

#pageStatus {
  visibility: hidden
}


/* V3.6 — fixed-proportion reader; shell (book + arrows) scales together */
@media(min-width:851px) {
  .reader {
    padding: 18px 24px 32px
  }

  .reader-top {
    width: min(1440px, calc(100vw - 120px));
    margin: 0 auto 12px;
    padding: 0 18px
  }

  .book-shell {
    width: 1532px;
    height: 820px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: none;
    transform-origin: top center;
  }

  .book {
    flex: 0 0 1440px;
    width: 1440px;
    height: 820px;
    min-height: 820px;
    grid-template-columns: 714px 12px 714px;
  }

  .page {
    width: 714px;
    height: 820px;
    padding: 54px 66px 62px;
  }

  .page-text {
    height: 100%;
    overflow: hidden;
    font: 17px/1.68 'Libre Baskerville', Georgia, serif;
    white-space: pre-wrap;
  }

  .page-text.chapter-start h3 {
    margin: 38px 0 32px
  }

  .page-arrow {
    flex: 0 0 38px;
    align-self: center;
  }

  .reader-bottom {
    width: min(1440px, calc(100vw - 120px))
  }
}

/* V3.7 — exact rendered-height pagination probe */
.measure-page {
  position: fixed !important;
  left: -10000px !important;
  top: 0 !important;
  width: 714px !important;
  height: 820px !important;
  padding: 54px 66px 62px !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: -9999 !important;
  overflow: hidden !important;
}

.measure-page .page-text {
  height: 100% !important;
  overflow: hidden !important;
  font: 17px/1.68 'Libre Baskerville', Georgia, serif !important;
  white-space: pre-wrap !important;
}

.measure-page .chapter-start h3 {
  font: 600 34px 'Playfair Display' !important;
  text-align: center !important;
  margin: 38px 0 32px !important;
}

.measure-body {
  white-space: pre-wrap
}

/* V3.8 — chapter title treatment */
.page-text.chapter-start h3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 34px 0 32px;
}

.page-text.chapter-start h3 span {
  font: 600 30px 'Playfair Display';
}

.page-text.chapter-start h3 em {
  font: italic 400 19px 'Libre Baskerville', Georgia, serif;
  color: #7d6468;
}

.measure-page .chapter-start h3 {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 34px 0 32px !important;
}

.measure-page .chapter-start h3 span {
  font: 600 30px 'Playfair Display' !important
}

.measure-page .chapter-start h3 em {
  font: italic 400 19px 'Libre Baskerville', Georgia, serif !important;
  color: #7d6468 !important
}

/* V4 — accounts + private library */
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px
}

.account-button {
  border: 1px solid #624252;
  background: #171014;
  color: #d8cdd2;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.library {
  max-width: 1180px;
  margin: 0 auto 80px;
  padding: 46px 28px;
  border-top: 1px solid rgba(255, 255, 255, .07)
}

.library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 28px
}

.library-head h2 {
  font: 600 42px 'Playfair Display';
  margin: 8px 0 4px
}

.library-head p {
  margin: 0;
  color: #94868d
}

.library-head .primary {
  border: 0;
  cursor: pointer
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px
}

.book-card {
  appearance: none;
  border: 1px solid #392832;
  background: #171014;
  border-radius: 18px;
  padding: 16px;
  text-align: left;
  color: #eee3e7;
  cursor: pointer;
  transition: .2s
}

.book-card:hover {
  transform: translateY(-4px);
  border-color: #704257;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .25)
}

.book-cover {
  aspect-ratio: 1.38/1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
  border-radius: 10px;
  background: radial-gradient(circle at top, #7d304e, #351621 62%, #211017);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 15px 30px rgba(0, 0, 0, .25)
}

.book-cover small {
  font-size: 9px;
  letter-spacing: 2px;
  color: #d8a3b6
}

.book-cover strong {
  font: 600 26px/1.15 'Playfair Display';
  margin: 15px 0;
  color: #fff
}

.book-cover i {
  font: italic 11px 'Libre Baskerville';
  color: #bd9da8
}

.book-meta {
  padding: 14px 4px 3px
}

.book-meta b {
  display: block;
  font: 600 18px 'Playfair Display';
  margin-bottom: 5px
}

.book-meta span {
  display: block;
  color: #887980;
  font-size: 11px
}

.book-meta em {
  display: block;
  color: #d27394;
  font-style: normal;
  font-size: 12px;
  margin-top: 12px
}

.empty-library {
  grid-column: 1/-1;
  text-align: center;
  border: 1px dashed #49313d;
  border-radius: 18px;
  padding: 45px;
  color: #93858c
}

.empty-library>span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid #8d4661;
  border-radius: 50%;
  margin: 0 auto 12px;
  font: italic 27px 'Playfair Display';
  color: #d66f92
}

.empty-library h3 {
  font: 600 23px 'Playfair Display';
  color: #ddd0d5;
  margin: 0 0 7px
}

.empty-library p {
  margin: 0
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 5, 7, .88);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 20px
}

.auth-card {
  position: relative;
  width: min(470px, 94vw);
  background: linear-gradient(180deg, #21151b, #130e11);
  border: 1px solid #4b303c;
  border-radius: 24px;
  padding: 38px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, .55)
}

.auth-close {
  position: absolute;
  right: 15px;
  top: 12px;
  border: 0;
  background: transparent;
  color: #9d8c94;
  font-size: 27px;
  cursor: pointer
}

.auth-brand {
  display: block;
  margin-bottom: 25px
}

.auth-card h2 {
  font: 600 34px 'Playfair Display';
  margin: 0 0 10px
}

.auth-card>p {
  color: #a899a0;
  line-height: 1.6
}

.auth-card .generate {
  width: 100%;
  margin: 18px 0 0
}

.auth-card .generate:disabled {
  opacity: .55
}

.auth-message {
  min-height: 20px !important;
  margin: 15px 0 0 !important;
  color: #d783a0 !important;
  font-size: 12px
}

@media(max-width:850px) {
  .header-actions .privacy {
    display: none
  }

  .account-button {
    max-width: 145px
  }

  .library {
    padding: 35px 18px
  }

  .library-head {
    align-items: flex-start;
    flex-direction: column
  }

  .library-grid {
    grid-template-columns: 1fr
  }

  .library-head h2 {
    font-size: 35px
  }
}

/* V4.1 — generated book-cover artwork */
.book-cover {
  position: relative;
  overflow: hidden;
  isolation: isolate
}

.book-cover>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3
}

.cover-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: transparent;
}

.cover-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7)
}

.cover-type small {
  font-size: 9px;
  letter-spacing: 2px;
  color: #f1d9e2
}

.cover-type strong {
  font: 600 26px/1.15 'Playfair Display';
  margin: 15px 0;
  color: #fff
}

.cover-type i {
  font: italic 11px 'Libre Baskerville';
  color: #ead8de
}

.cover-making {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  z-index: 2;
  text-align: center;
  font-size: 9px;
  letter-spacing: .7px;
  color: #f0dce4;
  background: rgba(20, 9, 14, .68);
  backdrop-filter: blur(5px);
  border-radius: 999px;
  padding: 6px 8px
}

/* V4.2 — cover action for books created before automatic covers */
.book-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px
}

.book-actions em {
  margin-top: 0
}

.create-cover {
  appearance: none;
  border: 1px solid #684052;
  background: rgba(124, 53, 82, .12);
  color: #dca0b6;
  border-radius: 999px;
  padding: 7px 11px;
  font: 600 10px/1 inherit;
  letter-spacing: .2px;
  cursor: pointer;
  white-space: nowrap
}

.create-cover:hover {
  background: rgba(124, 53, 82, .25);
  border-color: #8d526b
}

.create-cover:disabled {
  opacity: .55;
  cursor: default
}

/* V4.4 — proper portrait book library */
.library-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px
}

.book-card {
  padding: 14px
}

.book-cover {
  aspect-ratio: 2/3;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  border-radius: 5px 10px 10px 5px;
  background: linear-gradient(145deg, #5d233a, #211017 70%);
  box-shadow: -5px 8px 18px rgba(0, 0, 0, .22), 12px 22px 38px rgba(0, 0, 0, .28), inset 3px 0 0 rgba(255, 255, 255, .06);
}

.book-cover:after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(255, 255, 255, .08), transparent);
  z-index: 3;
  pointer-events: none
}

.book-cover>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0
}

.cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 1
}

.cover-placeholder small {
  font-size: 9px;
  letter-spacing: 2px;
  color: #d8a3b6
}

.cover-placeholder strong {
  font: 600 27px/1.12 'Playfair Display';
  margin-top: 18px;
  color: #fff
}

.book-cover .cover-making {
  z-index: 4
}

.book-meta {
  padding: 15px 2px 3px
}

.book-meta>b {
  font-size: 19px
}

@media(max-width:1050px) {
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media(max-width:760px) {
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px
  }
}

@media(max-width:470px) {
  .library-grid {
    grid-template-columns: 1fr
  }

  .book-cover {
    max-width: 280px
  }
}

/* V4.5 — cover identity */
.create-cover {
  font-size: 10px
}


/* Generated artwork + Lush cover typography */
.book-cover {
  position: relative;
  overflow: hidden
}

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

.cover-brand {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 16px 14px;
  pointer-events: none;
  color: #fff;
  background: linear-gradient(to bottom, transparent 48%, rgba(14, 8, 11, .08) 58%, rgba(14, 8, 11, .84) 100%);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .6)
}

.cover-brand-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.035em;
  margin-bottom: 13px;
  text-wrap: balance
}

.cover-brand-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px
}

.cover-v {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1
}

.cover-original {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .92
}

@media(max-width:700px) {
  .cover-brand-title {
    font-size: 25px
  }
}


/* V5.2 — library cover polish */
.cover-v {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 21px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: rgba(15, 9, 12, .22);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: rgba(255, 255, 255, .94);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .55);
}

.cover-brand-footer {
  display: block;
  min-height: auto
}

.cover-original {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  opacity: .92
}


/* V5.4 — true private bookshelf */
.library {
  max-width: 1280px;
  padding-top: 58px
}

.library-head {
  margin-bottom: 40px;
  align-items: center
}

.library-head h2 {
  font-size: 48px
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 220px));
  gap: 48px 34px;
  justify-content: start;
}

.book-card {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #eee3e7;
  text-align: left;
  transform: none !important;
}

.book-card:hover {
  border: 0;
  box-shadow: none
}

.book-open {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  cursor: pointer;
  text-align: inherit;
  color: inherit;
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  padding: 0;
  border-radius: 9px;
  box-shadow: 0 22px 45px rgba(0, 0, 0, .38), 0 2px 7px rgba(0, 0, 0, .35);
  transition: transform .22s ease, box-shadow .22s ease;
}

.book-open:hover .book-cover {
  transform: translateY(-7px) rotate(.15deg);
  box-shadow: 0 30px 58px rgba(0, 0, 0, .46), 0 4px 10px rgba(0, 0, 0, .32);
}

.book-open:focus-visible {
  outline: none
}

.book-open:focus-visible .book-cover {
  outline: 2px solid #c6537d;
  outline-offset: 5px
}

.book-meta {
  padding: 14px 2px 0
}

.book-meta>span {
  font-size: 11px;
  color: #81747a
}

.book-actions {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.continue-book {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: #d27394;
  font: 500 12px/1.3 Arial, sans-serif;
  cursor: pointer;
  text-align: left
}

.continue-book span {
  display: inline-block;
  margin-left: 4px;
  transition: transform .18s ease
}

.continue-book:hover span {
  transform: translateX(3px)
}

.book-menu {
  position: relative
}

.book-menu-toggle {
  appearance: none;
  border: 0;
  background: none;
  color: #75686e;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 3px 4px;
  letter-spacing: 1px
}

.book-menu-toggle:hover {
  color: #d7c8ce
}

.book-menu-toggle:focus-visible {
  outline: 2px solid #c56b8d;
  outline-offset: 3px;
  border-radius: 7px
}

.book-menu-popover {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: 205px;
  padding: 7px;
  border: 1px solid rgba(191, 104, 139, .38);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(37, 21, 30, .98), rgba(20, 13, 18, .99));
  box-shadow: 0 20px 50px rgba(0, 0, 0, .62), inset 0 1px rgba(255, 255, 255, .045);
  backdrop-filter: blur(18px)
}

.book-menu.open .book-menu-popover {
  display: block
}

.book-menu-popover:empty {
  display: none !important
}

.book-menu-popover .create-cover,
.book-menu-popover .manage-book-title,
.book-menu-popover .download-book-pdf,
.book-menu-popover .create-share-link,
.book-menu-popover .copy-share-link,
.book-menu-popover .disable-share-link,
.book-menu-popover .delete-book {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  padding: 9px 11px;
  color: #e1d5db;
  font: 500 12px 'DM Sans', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none
}

.book-menu-popover .create-cover:hover,
.book-menu-popover .manage-book-title:hover,
.book-menu-popover .create-share-link:hover,
.book-menu-popover .copy-share-link:hover {
  background: rgba(255, 255, 255, .065);
  color: #fff
}

.book-menu-popover .disable-share-link {
  color: #e69ab0
}

.book-menu-popover .disable-share-link:hover {
  background: rgba(169, 67, 104, .14);
  color: #ffc0d0
}

.book-menu-popover .delete-book {
  color: #e69ab0;
  margin-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  border-radius: 0 0 9px 9px;
  padding-top: 11px
}

.book-menu-popover .delete-book:hover {
  background: rgba(169, 67, 104, .14);
  color: #ffc0d0
}

.rename-book-card label {
  margin: 0 0 6px
}

.rename-book-card input {
  margin: 0 0 20px
}

.rename-book-card .notice-actions {
  grid-template-columns: 1fr 1fr;
  align-items: center
}

@media(max-width:1050px) {
  .library-grid {
    grid-template-columns: repeat(3, minmax(170px, 220px))
  }
}

@media(max-width:760px) {
  .library-head h2 {
    font-size: 40px
  }

  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 20px
  }
}

@media(max-width:470px) {
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px
  }

  .book-cover {
    max-width: none
  }

  .cover-brand {
    padding: 14px 11px 11px
  }

  .cover-brand-title {
    font-size: 21px
  }

  .cover-original {
    font-size: 6px
  }
}


/* Lush Fiction V1 — app navigation + separate views */
.app-view {
  min-height: calc(100vh - 150px)
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 22px
}

.nav-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9f9097;
  padding: 10px 13px;
  border-radius: 999px;
  font: 600 13px 'DM Sans', sans-serif;
  cursor: pointer;
  transition: .18s
}

.nav-link:hover {
  color: #eadde2;
  background: rgba(255, 255, 255, .035)
}

.nav-link.active {
  color: #fff;
  background: rgba(169, 67, 104, .16)
}

.account-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 90px 28px 130px
}

.account-page>h1 {
  font: 600 54px 'Playfair Display';
  margin: 10px 0 35px
}

.account-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(31, 21, 27, .97), rgba(20, 15, 18, .99));
  padding: 38px
}

.account-panel h2 {
  font: 600 28px 'Playfair Display';
  margin: 5px 0 10px
}

.account-panel p {
  color: #9d8f96;
  line-height: 1.65;
  margin: 0 0 25px
}

.account-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #c66c8c
}

.author-name-form {
  max-width: 520px;
  margin: 24px 0 25px
}

.author-name-form label {
  display: block;
  margin: 0 0 8px;
  color: #e4d7dc;
  font-weight: 600
}

.author-name-form>p {
  margin: 0 0 15px;
  font-size: 13px
}

.author-name-form .primary {
  margin-right: 12px
}

#authorNameStatus {
  color: #d9a0b4;
  font-size: 13px
}

.cover-placeholder-author {
  display: block;
  margin-top: 14px;
  color: rgba(239, 218, 212, .56);
  font: 500 10px 'DM Sans', sans-serif;
  letter-spacing: .08em
}

.secondary-button {
  appearance: none;
  border: 1px solid #624252;
  background: transparent;
  color: #d8cdd2;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer
}

@media(max-width:850px) {
  header {
    height: auto;
    min-height: 74px;
    flex-wrap: wrap;
    padding: 13px 18px
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin: 8px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding-top: 8px
  }

  .nav-link {
    padding: 9px 11px
  }

  .account-page {
    padding: 60px 20px 90px
  }

  .account-page>h1 {
    font-size: 44px
  }
}


/* Lush Fiction V1.1 — optional third character */
.third-character-wrap {
  margin-top: 14px
}

.add-character {
  appearance: none;
  border: 0;
  background: transparent;
  color: #a98b98;
  padding: 4px 2px;
  font: 500 12px 'DM Sans', sans-serif;
  cursor: pointer
}

.add-character:hover {
  color: #d27394
}

.third-character {
  display: block;
  max-width: calc(50% - 9px);
  margin-top: 12px
}

.third-character b {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.third-character b small {
  font-size: 8px;
  letter-spacing: 1.2px;
  color: #766970;
  font-weight: 500
}

.remove-character {
  appearance: none;
  border: 0;
  background: transparent;
  color: #766970;
  padding: 8px 0 0;
  font: 500 10px 'DM Sans', sans-serif;
  cursor: pointer
}

.remove-character:hover {
  color: #b99da8
}

@media(max-width:850px) {
  .third-character {
    max-width: none
  }
}

/* Lush Fiction V1.2 — guest trial + password account flow */
.auth-card label+label {
  margin-top: 14px
}

.auth-switch {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  border: 0;
  background: transparent;
  color: #c87995;
  font: 600 12px 'DM Sans', sans-serif;
  cursor: pointer
}

.auth-switch:hover {
  color: #efa9c1
}


/* Lush Fiction V1.3 — experience polish */
.quill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center
}

.quill span {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 38px;
  line-height: 1;
  transform: translate(2px, -2px)
}

.progress i {
  transition: width 1.8s cubic-bezier(.22, .61, .36, 1)
}

.writing-card {
  width: min(540px, 88vw)
}

.loading h3 {
  font-size: 32px;
  margin-top: 0
}

.loading p {
  margin-top: 10px
}

.cover-v {
  font-style: italic;
  font-weight: 600;
  padding-left: 1px;
  padding-bottom: 1px
}

/* Compact save-book account gate */
.auth-card {
  width: min(440px, 94vw);
  padding: 32px 34px 30px
}

.auth-brand {
  margin-bottom: 20px
}

.auth-card h2 {
  font-size: 32px;
  margin-bottom: 7px
}

.auth-card>p {
  margin: 0 0 20px;
  line-height: 1.5
}

.auth-card label {
  font-size: 11px
}

.auth-card input {
  margin-top: 7px
}

.auth-card .generate {
  margin-top: 15px
}

.auth-switch {
  margin-top: 11px
}

#authIntro, #authSwitch {
  font: inherit;
  line-height: 1.5;
  color: #a899a0
}

.auth-message {
  margin-top: 10px !important
}

/* Account-created confirmation */
.success-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(8, 5, 7, .84);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  padding: 20px
}

.success-card {
  width: min(440px, 92vw);
  text-align: center;
  background: linear-gradient(180deg, #21151b, #130e11);
  border: 1px solid #4b303c;
  border-radius: 26px;
  padding: 40px 38px 36px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, .6)
}

.success-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  border: 1px solid #a94368;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center
}

.success-mark span {
  font: italic 600 31px/1 "Playfair Display", Georgia, serif;
  transform: translate(2px, -1px)
}

.success-card .eyebrow {
  margin-bottom: 12px
}

.success-card h2 {
  font: 600 36px/1.1 "Playfair Display", Georgia, serif;
  margin: 0 0 14px
}

.success-card p {
  color: #aa9aa1;
  line-height: 1.65;
  margin: 0 auto 25px;
  max-width: 350px
}

.success-card .generate {
  width: 100%;
  margin: 0
}

/* Lush Fiction V1.4 — optical H alignment */
/* Italic serif glyphs have uneven visual side-bearings, so centre the visible H rather than its font box. */
.quill span {
  transform: translate(-1px, -2px);
}

.cover-v {
  font-style: italic;
  font-weight: 600;
  padding-left: 0;
  padding-bottom: 0;
  text-indent: -1px;
}

.success-mark span {
  transform: translate(-3px, 0);
}


/* Lush Fiction V1.6 — dashboard logo */
.brand-logo {
  display: flex;
  align-items: center;
  width: 225px;
  height: 63px;
  overflow: hidden;
  flex: none
}

.brand-logo img {
  display: block;
  width: 225px;
  height: auto;
  transform: translateY(1px)
}

@media(max-width:850px) {
  .brand-logo {
    width: 179px;
    height: 48px
  }

  .brand-logo img {
    width: 179px
  }
}

@media(max-width:520px) {
  .brand-logo {
    width: 155px
  }

  .brand-logo img {
    width: 155px
  }

  .header-actions {
    gap: 8px
  }

  .account-button {
    max-width: 110px
  }
}


/* Lush Fiction V1.7 — Chapter Two guest save moment */
.guest-upgrade {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 26px 8px;
  text-align: center
}

.story-complete {
  max-width: 680px;
  margin: 0 auto;
  padding: 34px 26px;
  text-align: center
}

.story-complete .eyebrow {
  margin: 10px 0 12px;
  font-size: 10px;
  letter-spacing: 2.6px
}

.story-complete>p {
  max-width: 600px;
  margin: 0 auto;
  color: #aa9aa1;
  line-height: 1.65
}

.guest-upgrade .eyebrow {
  margin: 10px 0 12px;
  font-size: 10px;
  letter-spacing: 2.6px
}

.guest-upgrade h3 {
  font: 600 38px/1.12 "Playfair Display", Georgia, serif;
  margin: 0 0 12px
}

.guest-upgrade>p {
  margin: 0 auto 22px;
  color: #aa9aa1;
  font-size: 16px
}

.guest-upgrade .generate {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 auto;
  padding: 16px 30px
}

.guest-upgrade .generate span {
  transition: transform .18s ease
}

.guest-upgrade .generate:hover span {
  transform: translateX(3px)
}

.guest-upgrade>small {
  display: block;
  margin-top: 13px;
  color: #7f7178;
  font-size: 11px
}

@media(max-width:850px) {
  .guest-upgrade {
    padding: 22px 12px 4px
  }

  .guest-upgrade h3 {
    font-size: 31px
  }
}


/* Lush Fiction V1.8 — real logo in account/save modal */
.auth-brand {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  width: 230px;
  height: auto
}

.auth-brand img {
  display: block;
  width: 100%;
  height: auto
}

@media(max-width:520px) {
  .auth-brand {
    width: 205px
  }
}

/* Lush Fiction V1.9 — conversion + professional notices */
.guest-upgrade {
  max-width: 720px;
  padding-top: 34px
}

.guest-upgrade h3 {
  font-size: 42px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto
}

.guest-upgrade>p {
  max-width: 620px;
  line-height: 1.65;
  margin-bottom: 25px
}

.guest-upgrade>small {
  margin-top: 15px
}

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(8, 5, 7, .88);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  padding: 20px
}

.notice-card {
  position: relative;
  width: min(500px, 94vw);
  background: linear-gradient(180deg, #21151b, #130e11);
  border: 1px solid #563342;
  border-radius: 26px;
  padding: 36px 38px 34px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, .6)
}

.notice-card .auth-brand {
  width: 215px;
  margin-bottom: 26px
}

.notice-card .eyebrow {
  margin-bottom: 10px
}

.notice-card h2 {
  font: 600 36px/1.12 'Playfair Display', Georgia, serif;
  margin: 0 0 13px
}

.notice-card>p {
  color: #aa9aa1;
  line-height: 1.65;
  margin: 0 0 24px;
  font-size: 15px
}

.notice-actions {
  display: grid;
  gap: 10px
}

.notice-actions .generate {
  width: 100%;
  margin: 0
}

.notice-secondary {
  appearance: none;
  border: 0;
  background: transparent;
  color: #d483a0;
  padding: 10px;
  font: 600 13px 'DM Sans', sans-serif;
  cursor: pointer
}

.notice-secondary:hover {
  color: #f0aec5
}

@media(max-width:520px) {
  .notice-card {
    padding: 30px 26px
  }

  .notice-card h2 {
    font-size: 31px
  }

  .guest-upgrade h3 {
    font-size: 32px
  }
}

/* Lush Fiction V1.9.1 — modal logo: match restrained header treatment */
.auth-card .auth-brand,
.notice-card .auth-brand {
  display: flex;
  align-items: center;
  width: 220px;
  height: 58px;
  overflow: hidden;
  margin-bottom: 24px;
}

.auth-card .auth-brand img,
.notice-card .auth-brand img {
  display: block;
  width: 220px;
  height: auto;
  max-width: none;
  filter: none;
  mix-blend-mode: normal;
  transform: translateY(1px);
}

@media(max-width:520px) {

  .auth-card .auth-brand,
  .notice-card .auth-brand {
    width: 174px;
    height: 48px
  }

  .auth-card .auth-brand img,
  .notice-card .auth-brand img {
    width: 174px
  }
}

/* Lush Fiction V1.9.3 — modal brand optical alignment */
.auth-card .auth-brand,
.notice-card .auth-brand {
  margin-left: -28px;
  margin-bottom: 18px;
}

@media(max-width:520px) {

  .auth-card .auth-brand,
  .notice-card .auth-brand {
    margin-left: -22px;
    margin-bottom: 16px
  }
}


/* Lush Fiction V2.0 — bookshelf as a private library */
.library {
  max-width: 1240px;
  padding-top: 64px
}

.library-head {
  margin-bottom: 34px
}

.library-head h2 {
  font-size: 52px;
  letter-spacing: -.02em
}

.library-head p {
  font-size: 14px;
  line-height: 1.6
}

.library-featured {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  position: relative;
  margin: 0 0 54px;
  padding: 34px 42px 34px 34px;
  border: 1px solid rgba(139, 76, 101, .34);
  border-radius: 26px;
  background: radial-gradient(circle at 14% 20%, rgba(141, 52, 86, .16), transparent 38%), linear-gradient(135deg, rgba(34, 21, 28, .98), rgba(18, 13, 16, .98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .24);
  overflow: hidden
}

.library-featured::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(178, 68, 108, .08), transparent 68%);
  pointer-events: none
}

.featured-book-art {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  perspective: 900px;
  position: relative;
  z-index: 1
}

.featured-book-art .book-cover {
  max-width: 190px;
  margin: 0;
  box-shadow: 0 30px 55px rgba(0, 0, 0, .48), -8px 8px 18px rgba(0, 0, 0, .2);
  transform: rotateY(-5deg);
  transform-origin: left center
}

.featured-book-art:hover .book-cover {
  transform: translateY(-5px) rotateY(-2deg)
}

.featured-book-copy {
  position: relative;
  z-index: 1;
  max-width: 650px
}

.featured-book-copy .eyebrow {
  margin-bottom: 12px
}

.featured-book-copy h3 {
  font: 600 42px/1.06 'Playfair Display';
  letter-spacing: -.02em;
  margin: 0 0 11px;
  color: #f1e7ea
}

.featured-progress {
  margin: 0 0 17px;
  color: #d28aa3;
  font: italic 14px 'Libre Baskerville', Georgia, serif
}

.featured-note {
  max-width: 540px;
  margin: 0 0 25px;
  color: #a99aa1;
  font-size: 15px;
  line-height: 1.65
}

.featured-continue {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #b74670, #913052);
  color: #fff;
  padding: 13px 21px;
  font: 700 13px 'DM Sans', sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(125, 38, 72, .2)
}

.featured-continue span {
  display: inline-block;
  margin-left: 7px;
  transition: transform .18s ease
}

.featured-continue:hover span {
  transform: translateX(4px)
}

.featured-book-copy>small {
  display: block;
  margin-top: 13px;
  color: #70636a;
  font-size: 10px
}

.library-collection-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.library-collection-head>div>span {
  display: block;
  color: #a45c76;
  font: 700 9px 'DM Sans', sans-serif;
  letter-spacing: 2.2px;
  margin-bottom: 5px
}

.library-collection-head h3 {
  margin: 0;
  font: 600 26px 'Playfair Display';
  color: #e8dde1
}

.library-count {
  color: #756970;
  font-size: 11px
}

.library .library-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: 46px 34px
}

.book-meta b {
  display: block;
  margin: 0 0 6px;
  font: 600 17px/1.2 'Playfair Display';
  color: #e9dfe3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

/* Give every bookshelf cover a more convincing bound-book edge. */
.book-cover::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 9px;
  z-index: 4;
  border-radius: 9px 0 0 9px;
  background: linear-gradient(90deg, rgba(9, 4, 7, .7), rgba(52, 22, 34, .5) 42%, rgba(255, 255, 255, .12) 78%, rgba(0, 0, 0, .12));
  box-shadow: 3px 0 8px rgba(0, 0, 0, .25);
  pointer-events: none
}

.book-cover::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 0;
  bottom: 0;
  width: 1px;
  z-index: 4;
  background: rgba(255, 255, 255, .18);
  box-shadow: 2px 0 4px rgba(0, 0, 0, .25);
  pointer-events: none
}

/* Stronger centre binding in the reader. */
.book {
  grid-template-columns: 1fr 20px 1fr
}

.spine {
  position: relative;
  background: linear-gradient(90deg, rgba(24, 12, 11, .72) 0%, rgba(72, 47, 39, .48) 18%, rgba(245, 229, 209, .22) 47%, rgba(58, 37, 31, .52) 72%, rgba(19, 10, 10, .78) 100%);
  box-shadow: -9px 0 18px rgba(35, 18, 14, .22), 9px 0 18px rgba(35, 18, 14, .22), inset 0 0 8px rgba(0, 0, 0, .45);
  z-index: 3
}

.spine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 245, 230, .28);
  box-shadow: 0 0 7px rgba(255, 238, 215, .2)
}

.left-page {
  box-shadow: inset -24px 0 32px rgba(80, 55, 35, .12), inset 0 0 45px rgba(80, 55, 35, .05)
}

.right-page {
  box-shadow: inset 24px 0 32px rgba(80, 55, 35, .12), inset 0 0 45px rgba(80, 55, 35, .05)
}

@media(max-width:850px) {
  .library {
    padding-top: 42px
  }

  .library-head h2 {
    font-size: 43px
  }

  .library-featured {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 25px;
    padding: 25px
  }

  .featured-book-art .book-cover {
    max-width: 140px
  }

  .featured-book-copy h3 {
    font-size: 33px
  }

  .library .library-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
    gap: 34px 20px
  }

  .book {
    grid-template-columns: 1fr
  }

  .spine {
    display: none
  }
}

@media(max-width:590px) {
  .library-featured {
    grid-template-columns: 1fr;
    padding: 24px;
    text-align: center
  }

  .featured-book-art .book-cover {
    max-width: 150px;
    margin: 0 auto
  }

  .featured-book-copy {
    margin: 0 auto
  }

  .featured-note {
    margin-left: auto;
    margin-right: auto
  }

  .library-collection-head {
    text-align: left
  }

  .library .library-grid {
    gap: 30px 15px
  }

  .book-meta b {
    font-size: 15px
  }
}


/* Lush Fiction V2.0.1 — account-created modal uses the real brand logo */
.success-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 64px;
  overflow: hidden;
  margin: 0 auto 24px
}

.success-brand img {
  display: block;
  width: 240px;
  height: auto;
  max-width: none;
  filter: none;
  mix-blend-mode: normal;
  transform: translateY(1px)
}

@media(max-width:520px) {
  .success-brand {
    width: 205px;
    height: 56px;
    margin-bottom: 20px
  }

  .success-brand img {
    width: 205px
  }
}


/* Lush Fiction V2.0.7 — header logo optical position */
@media(min-width:901px) {

  .topbar .brand-logo,
  header .brand-logo {
    transform: translateX(40px);
  }

  body.bookshelf-view header .brand-logo {
    transform: translateX(-30px);
  }
}


/* Lush Fiction V2.1 — carry the public-site palette and brand into the app */
:root {
  --ink: #f9e9e5;
  --muted: #c9b7b3;
  --wine: #e9a08f;
  --wine2: #f7b4a8;
  --bg: #080607;
  --panel: #140d0f;
  --line: #3a2928;
  --gold: #e9a08f;
}

body {
  background:
    radial-gradient(ellipse at 72% -5%, rgba(111, 50, 38, .20), transparent 34%),
    radial-gradient(ellipse at 24% 70%, rgba(88, 37, 45, .12), transparent 38%),
    #080607;
  color: #f9e9e5;
}

header {
  border-bottom-color: rgba(255, 220, 211, .14)
}

.brand-logo {
  width: 190px;
  height: 66px;
  overflow: visible
}

.brand-logo img {
  width: 190px;
  height: auto;
  transform: none
}

.main-nav .nav-link {
  color: #c9b7b3
}

.main-nav .nav-link:hover, .main-nav .nav-link.active {
  color: #ffd2c8
}

.main-nav .nav-link.active::after {
  background: #e9a08f
}

.privacy {
  color: #9d8985
}

.account-button {
  border-color: rgba(255, 221, 213, .30);
  background: rgba(10, 8, 9, .46);
  color: #f6e9e6
}

.account-button:hover {
  border-color: rgba(255, 221, 213, .55)
}

.eyebrow {
  color: #e9a797
}

.hero h1 {
  color: #f9e4df
}

.hero h1 em {
  color: #f7b4a8
}

.hero p {
  color: #c9b7b3
}

body:has(#createView:not(.hidden)) {
  position: relative;
  isolation: isolate
}

body:has(#createView:not(.hidden))::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 96px), var(--site-max));
  aspect-ratio: 2 / 3;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 25%, rgba(8, 6, 7, .65) 48%, #080607 75%),
    linear-gradient(to right, rgba(8, 6, 7, .88), rgba(8, 6, 7, .55) 35%, transparent 65%),
    url('/images/Create_background_image.jpeg');
  background-position: top right;
  background-size: 100% auto, 100% auto, 68% auto;
  background-repeat: no-repeat;
}

#createView .hero {
  text-align: left;
  width: min(calc(100% - 96px), var(--site-max));
  max-width: none;
  padding-left: 0;
  padding-right: 0
}

@media(max-width:1180px) {
  body:has(#createView:not(.hidden))::before {
    width: calc(100% - 52px)
  }
}

@media(max-width:850px) {
  body:has(#createView:not(.hidden))::before {
    background-image: linear-gradient(to bottom, rgba(8, 6, 7, .25), #080607 85%), linear-gradient(to right, rgba(8, 6, 7, .8), rgba(8, 6, 7, .2)), url('/images/Create_background_image.jpeg')
  }
}

@media(max-width:560px) {
  body:has(#createView:not(.hidden))::before {
    width: calc(100% - 30px)
  }
}

#createView .hero p {
  margin-left: 0;
  margin-right: 0
}

#createView .hero .resume {
  margin-left: 0
}

#createView .creator {
  background: linear-gradient(180deg, rgba(35, 18, 22, .78), rgba(15, 10, 12, .96))
}

.primary, .generate, .featured-continue {
  background: linear-gradient(135deg, #ffd3ca, #f2a99e);
  color: #171011;
  box-shadow: 0 12px 34px rgba(241, 169, 158, .12);
}

.resume {
  border-color: rgba(244, 176, 159, .42);
  color: #f3c1b6
}

.trust {
  color: #9d8985
}

.creator, .auth-card, .notice-card, .success-card {
  background: linear-gradient(180deg, rgba(35, 18, 22, .97), rgba(15, 10, 12, .99));
  border-color: rgba(255, 211, 201, .20);
}

.section-head>span {
  border-color: rgba(239, 185, 173, .48);
  color: #f6c9bf
}

.section-head h2, .library-head h2, .library-collection-head h3, .account-page h1, .account-panel h2 {
  color: #f6ddd7
}

.section-head p, .library-head p, .account-panel p {
  color: #bfaeaa
}

.character-card, input, textarea, select {
  border-color: #3a2928;
  background: #0d090a
}

.character-card {
  background: linear-gradient(145deg, #140d0f, #0b0809)
}

input:focus, textarea:focus, select:focus {
  border-color: #e9a08f;
  box-shadow: 0 0 0 3px rgba(233, 160, 143, .10)
}

.moods button {
  border-color: #493330;
  background: #0f0b0c;
  color: #c9b7b3
}

.moods button:hover, .moods button.active {
  background: #6b342f;
  border-color: #e9a08f;
  color: #fff;
  box-shadow: 0 6px 20px rgba(233, 160, 143, .12)
}

.field-title {
  font-size: 12px;
  letter-spacing: 0;
  color: #d8cdd2
}

.field-title small {
  font-size: 12px;
  letter-spacing: 0;
  color: #91848b;
  margin-left: 7px
}

.fine {
  color: #897976
}

footer {
  border-top-color: rgba(255, 220, 211, .14);
  color: #897976
}

.loading {
  background: rgba(8, 6, 7, .95)
}

.quill {
  border-color: #e9a08f;
  color: #f7b4a8;
  animation: none
}

.loading-heart {
  display: block;
  width: 42px;
  height: 42px;
  fill: #f7b4a8;
  filter: drop-shadow(0 0 6px rgba(247, 180, 168, .3));
  transform-origin: center;
  animation: heartbeat 1.3s ease-in-out infinite
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1)
  }

  14% {
    transform: scale(1.14)
  }

  28% {
    transform: scale(1)
  }

  42% {
    transform: scale(1.1)
  }

  58% {
    transform: scale(1)
  }
}

.reader .page-arrow {
  width: 60px;
  height: 78px;
  font-size: 48px
}

@media(max-width:850px) {
  .reader .page-arrow {
    width: 52px;
    height: 70px;
    font-size: 44px
  }
}

.progress {
  background: #2a1d1c
}

.progress i {
  background: linear-gradient(90deg, #c77e70, #f7b4a8)
}

.dots b {
  background: #e9a08f
}

.library-featured {
  border-color: rgba(255, 211, 201, .20);
  background: radial-gradient(circle at 14% 20%, rgba(111, 50, 38, .18), transparent 38%), linear-gradient(135deg, rgba(35, 18, 22, .98), rgba(15, 10, 12, .98));
}

.library-featured::after {
  background: radial-gradient(circle, rgba(233, 160, 143, .08), transparent 68%)
}

.featured-progress {
  color: #e6a394
}

.library-collection-head>div>span {
  color: #e9a797
}

.book-meta em, .notice-secondary {
  color: #e9a797
}

.create-cover {
  border-color: rgba(239, 185, 173, .35);
  background: rgba(233, 160, 143, .08);
  color: #f0b9ad
}

.create-cover:hover {
  background: rgba(233, 160, 143, .16);
  border-color: #e9a08f
}

.auth-modal, .notice-modal {
  background: rgba(8, 6, 7, .90)
}

.auth-message {
  color: #e9a797 !important
}

.auth-card .auth-brand, .notice-card .auth-brand {
  margin-left: 0;
  width: 190px;
  height: auto;
  overflow: visible
}

.auth-card .auth-brand img, .notice-card .auth-brand img {
  width: 190px;
  height: auto;
  transform: none
}

.success-brand {
  width: 205px;
  height: auto;
  overflow: visible
}

.success-brand img {
  width: 205px;
  height: auto;
  transform: none
}

@media(max-width:850px) {
  .brand-logo {
    width: 160px;
    height: 55px
  }

  .brand-logo img {
    width: 160px
  }
}

@media(max-width:520px) {
  .brand-logo {
    width: 138px;
    height: 48px
  }

  .brand-logo img {
    width: 138px
  }

  .auth-card .auth-brand, .notice-card .auth-brand {
    width: 170px
  }

  .auth-card .auth-brand img, .notice-card .auth-brand img {
    width: 170px
  }

  .success-brand, .success-brand img {
    width: 180px
  }
}


/* Lush Fiction V2.2 — align app geometry and typography with public site */
:root {
  --site-max: 1440px
}

/* Same desktop canvas and gutters as the public homepage. */
header {
  width: min(calc(100% - 96px), var(--site-max));
  max-width: none;
  height: 92px;
  margin: 0 auto;
  padding: 0;
}

.library {
  width: min(calc(100% - 96px), var(--site-max));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

footer {
  width: min(calc(100% - 96px), var(--site-max));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

/* Match the public header logo's optical size and remove legacy offsets. */
header .brand-logo,
body.bookshelf-view header .brand-logo {
  width: 224.4px;
  height: auto;
  transform: none;
  display: flex;
  align-items: center;
  overflow: visible;
}

header .brand-logo img,
body.bookshelf-view header .brand-logo img {
  display: block;
  width: 224.4px;
  height: auto;
  transform: none;
}

/* Carry the homepage's lighter editorial serif into the bookshelf. */
.library-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1;
}

.featured-book-copy h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 46px;
  line-height: 1.02;
  letter-spacing: -.025em;
}

.library-collection-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -.015em;
}

.book-meta b {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: -.01em;
}

/* Softer text inside the story creator fields. */
.creator input,
.creator textarea,
.creator select {
  color: #c9b8b3;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
}

.creator input::placeholder,
.creator textarea::placeholder {
  color: #857572;
  opacity: 1
}

@media(max-width:1180px) {
  header, .library, footer, #createView .hero {
    width: calc(100% - 52px)
  }
}

@media(max-width:850px) {
  header {
    height: auto;
    padding-top: 13px;
    padding-bottom: 13px
  }

  header .brand-logo, body.bookshelf-view header .brand-logo {
    width: 187.44px
  }

  header .brand-logo img, body.bookshelf-view header .brand-logo img {
    width: 187.44px
  }

  .featured-book-copy h3 {
    font-size: 37px
  }
}

@media(max-width:560px) {
  header, .library, footer, #createView .hero {
    width: calc(100% - 30px)
  }

  header .brand-logo, body.bookshelf-view header .brand-logo {
    width: 158.4px
  }

  header .brand-logo img, body.bookshelf-view header .brand-logo img {
    width: 158.4px
  }

  .book-meta b {
    font-size: 18px
  }
}

/* Lush Fiction V2.3 — match public-site book typography and creator width */
/* The creator now uses the same broad visual canvas as the marketing site. */
.creator {
  width: min(calc(100% - 96px), 1280px);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 56px;
  padding-right: 56px;
}

/* Book names use the same refined, regular-weight editorial serif language
   as the titles presented on the public homepage. */
.book-meta b {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.08;
  letter-spacing: -.015em;
  color: #f4dfda;
}

.featured-book-copy h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  letter-spacing: -.03em;
}

.library-collection-head h3,
.library-head h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
}

@media(max-width:1180px) {
  .creator {
    width: calc(100% - 52px);
    padding-left: 42px;
    padding-right: 42px
  }
}

@media(max-width:850px) {
  .creator {
    width: calc(100% - 30px);
    margin-left: auto;
    margin-right: auto;
    padding: 30px 22px
  }
}

/* V11 — Lush cover typography: match the elegant homepage sample covers.
   Cover titles are HTML overlays on text-free generated artwork, so this updates
   both existing and future books without regenerating their artwork. */
.cover-brand-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 32px;
  line-height: .92;
  letter-spacing: -.01em;
  margin-bottom: 13px;
  text-wrap: balance;
  color: #f0e1d6;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .26);
}

/* Restore the original bookshelf title treatment beneath each cover. */
.book-meta>b {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  line-height: normal;
  letter-spacing: normal;
}

@media(max-width:700px) {
  .cover-brand-title {
    font-size: 27px
  }
}


/* Lush Fiction V2.4 — final bookshelf cover identity polish */
.cover-brand-title {
  color: #f0e1d6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .26);
}

.cover-placeholder strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  letter-spacing: -.01em;
  color: #f0e1d6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .26);
}

.cover-v {
  border-color: rgba(232, 198, 188, .52);
  background: rgba(12, 8, 9, .30);
  color: rgba(232, 198, 188, .78);
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 12px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .65);
  opacity: .88;
}

.cover-original {
  font-family: 'DM Sans', Arial, Helvetica, sans-serif;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: .16em;
  color: rgba(239, 218, 212, .76);
  opacity: 1;
  text-shadow: 0 1px 7px rgba(0, 0, 0, .75);
}

@media(max-width:700px) {
  .cover-original {
    font-size: 6px;
    letter-spacing: .14em
  }
}


/* Lush Fiction V2.6 — embossed Lush seal at top centre */
.cover-v {
  top: 20px;
  right: auto;
  bottom: auto;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translateX(-50%);
  border: 1px solid rgba(232, 198, 188, .48);
  background: rgba(18, 11, 13, .16);
  color: rgba(232, 198, 188, .70);
  font-size: 25px;
  font-weight: 500;
  opacity: .78;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow:
    inset 0 1px 1px rgba(255, 240, 232, .16),
    inset 0 -1px 1px rgba(0, 0, 0, .34),
    0 1px 2px rgba(0, 0, 0, .30);
  text-shadow:
    0 1px 0 rgba(255, 235, 225, .14),
    0 -1px 0 rgba(0, 0, 0, .55);
}

.cover-brand {
  padding-bottom: 14px;
}

.cover-original {
  text-align: center;
}

@media(max-width:470px) {
  .cover-v {
    top: 14px;
    width: 38px;
    height: 38px;
    font-size: 21px;
  }

  .cover-brand {
    padding-bottom: 11px
  }
}

/* Lush Fiction V2.7 — understated embossed H mark, top left */
.cover-v {
  top: 18px;
  left: 18px;
  right: auto;
  bottom: auto;
  width: auto;
  height: auto;
  transform: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  color: rgba(232, 198, 188, .68);
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 34px;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  opacity: .72;
  text-indent: 0;
  text-shadow:
    0 1px 0 rgba(255, 240, 232, .16),
    0 -1px 0 rgba(0, 0, 0, .58),
    0 2px 5px rgba(0, 0, 0, .28);
}

@media(max-width:470px) {
  .cover-v {
    top: 14px;
    left: 14px;
    width: auto;
    height: auto;
    font-size: 29px;
  }
}

/* Lush Fiction V2.8 — remove H mark; softer blended italic cover titles */
.cover-v {
  display: none !important;
}

.cover-brand-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: rgba(240, 225, 214, .88);
  text-shadow:
    0 1px 5px rgba(0, 0, 0, .34),
    0 3px 14px rgba(0, 0, 0, .18);
}

.cover-placeholder strong {
  font-style: italic;
  font-weight: 400;
  color: rgba(240, 225, 214, .88);
  text-shadow:
    0 1px 5px rgba(0, 0, 0, .34),
    0 3px 14px rgba(0, 0, 0, .18);
}

.share-reader {
  z-index: 10
}

.share-cover-stage {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  padding: 10px 0 28px
}

.share-cover-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border: 0;
  background: transparent;
  color: #d9a0b4;
  font: 500 14px 'DM Sans', sans-serif;
  cursor: pointer
}

.share-cover-button>span b {
  display: inline-block;
  margin-left: 5px;
  transition: transform .18s ease
}

.share-cover-button:hover>span b {
  transform: translateX(4px)
}

.share-book-cover {
  width: min(520px, 76vw);
  max-width: 520px;
  aspect-ratio: 2/3
}

.share-book-cover .cover-brand {
  align-items: center;
  text-align: center
}

.share-book-cover:after {
  width: 15px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .22) 42%, rgba(255, 255, 255, .16) 76%, transparent);
  box-shadow: 3px 0 9px rgba(0, 0, 0, .36)
}

.share-book-cover .cover-v {
  font-size: 34px
}

.share-reader .book-shell {
  margin-left: auto;
  margin-right: auto
}

.share-reader .page-arrow {
  width: 60px;
  height: 78px;
  font-size: 48px
}

.share-error {
  width: min(600px, 90vw);
  margin: 12vh auto;
  text-align: center;
  color: #e7dce0
}

.share-error h1 {
  font: 600 36px 'Playfair Display', Georgia, serif
}

.share-error p {
  color: #aa9aa1;
  line-height: 1.6
}

.share-error a, .share-home {
  color: #d9a0b4;
  text-decoration: none
}

@media(max-width:850px) {
  .share-cover-stage {
    min-height: calc(100vh - 125px)
  }

  .share-book-cover {
    width: min(350px, 80vw)
  }

  .share-reader .page-arrow {
    width: 52px;
    height: 70px;
    font-size: 44px
  }
}

/* Book cover title and author overlay */
.book-cover {
  container-type: inline-size
}

.cover-brand {
  justify-content: flex-end;
  align-items: center;
  padding: 7% 7% 6%;
  background: linear-gradient(to top,
      rgba(10, 5, 8, .78) 0%,
      rgba(10, 5, 8, .48) 15%,
      rgba(10, 5, 8, .12) 32%,
      transparent 48%);
  text-align: center;
}

.cover-brand-title {
  width: 92%;
  max-width: 92%;
  margin: 0 auto clamp(10px, 3.2cqw, 16px);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(22px, 15cqw, 82px);
  font-style: italic;
  font-weight: 400;
  line-height: .84;
  letter-spacing: -.02em;
  text-align: center;
  text-indent: 0;
  text-align-last: center;
  text-wrap: balance;
  overflow-wrap: normal;
  background: linear-gradient(180deg, #fff8e7 0%, #f7e5bd 30%, #e7c78e 60%, #bd884b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .8)) drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
}

.cover-brand-title.is-multiline {
  position: relative;
  left: -4%;
  width: 84%;
  max-width: 84%;
  box-sizing: border-box;
  padding-right: .18em;
  text-indent: -.04em;
  text-align-last: right;
}

.cover-brand-title.is-three-word.is-multiline,
.cover-brand-title.is-long-multiline {
  left: 0;
  text-indent: 0;
  text-align-last: center;
}

.cover-brand-title.is-long-multiline {
  font-size: clamp(20px, 13.5cqw, 74px)
}

.cover-brand-footer {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 3cqw, 16px);
}

.cover-brand-footer::before {
  content: "";
  display: block;
  width: 56%;
  height: 1px;
  flex: none;
  background: linear-gradient(90deg, transparent 0%, rgba(210, 160, 88, .25) 15%, rgba(244, 204, 137, .9) 50%, rgba(210, 160, 88, .25) 85%, transparent 100%);
}

.cover-brand-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f4cc89;
  box-shadow: 0 0 7px rgba(244, 204, 137, .7);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cover-brand-footer .cover-original {
  max-width: 92%;
  color: #e8ddcf;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: clamp(8px, 2.4cqw, 13px);
  font-weight: 400;
  letter-spacing: .30em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
  overflow-wrap: anywhere;
}

.cover-placeholder strong {
  display: block;
  width: 92%;
  max-width: 92%;
  margin: 0 auto 0;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(22px, 15cqw, 82px);
  font-style: italic;
  font-weight: 400;
  line-height: .84;
  letter-spacing: -.02em;
  text-align: center;
  text-indent: 0;
  text-align-last: center;
  text-wrap: balance;
  overflow-wrap: normal;
  background: linear-gradient(180deg, #fff8e7 0%, #f7e5bd 30%, #e7c78e 60%, #bd884b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .8)) drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
}

.cover-placeholder strong.is-multiline {
  position: relative;
  left: -4%;
  width: 84%;
  max-width: 84%;
  box-sizing: border-box;
  padding-right: .18em;
  text-indent: -.04em;
  text-align-last: right;
}

.cover-placeholder strong.is-three-word.is-multiline,
.cover-placeholder strong.is-long-multiline {
  left: 0;
  text-indent: 0;
  text-align-last: center;
}

.cover-placeholder strong.is-long-multiline {
  font-size: clamp(20px, 13.5cqw, 74px)
}

.cover-placeholder strong::after {
  content: "";
  display: block;
  width: 56%;
  height: 1px;
  margin: clamp(10px, 3cqw, 16px) auto 0;
  background: linear-gradient(90deg, transparent 0%, rgba(210, 160, 88, .25) 15%, rgba(244, 204, 137, .9) 50%, rgba(210, 160, 88, .25) 85%, transparent 100%);
  box-shadow: 0 0 3px rgba(244, 204, 137, .3);
}

.cover-placeholder {
  background: linear-gradient(to top, rgba(10, 5, 8, .94) 0%, rgba(10, 5, 8, .78) 22%, rgba(10, 5, 8, .48) 45%, rgba(10, 5, 8, .15) 70%, transparent 100%)
}

.cover-placeholder-author {
  margin-top: clamp(12px, 3cqw, 16px);
  max-width: 92%;
  color: #e8ddcf;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: clamp(8px, 2.4cqw, 13px);
  font-weight: 400;
  letter-spacing: .30em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
}

.page-text.share-end-page {
  position: absolute;
  inset: 0;
  padding: 0;
  white-space: normal;
  background: #211317;
}

.share-end-page a {
  display: block;
  width: 100%;
  height: 100%
}

.share-end-page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.share-end-page a:focus-visible {
  outline: 3px solid #efa9c1;
  outline-offset: -3px
}

/* Match the Create page title hierarchy to the marketing pages. */
.hero h1 {
  font: 400 clamp(40px, 5.4vw, 68px)/1.12 'Libre Baskerville', Georgia, serif;
  letter-spacing: -.035em
}

.section-head h2 {
  font: 400 clamp(30px, 3vw, 39px)/1.16 'Libre Baskerville', Georgia, serif;
  letter-spacing: -.02em
}

.creator>.custom-style+label {
  margin-top: 18px
}

.account-page>h1 {
  font: 400 clamp(40px, 5.4vw, 68px)/1.12 'Libre Baskerville', Georgia, serif;
  letter-spacing: -.035em
}

.account-panel h2 {
  font: 400 clamp(24px, 2.2vw, 30px)/1.2 'Libre Baskerville', Georgia, serif;
  letter-spacing: -.02em
}

.site-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px
}

.site-footer .footer-links {
  display: flex;
  gap: 24px
}

.site-footer .footer-links a {
  color: #a89490;
  text-decoration: none;
  transition: color .2s
}

.site-footer .footer-links a:hover {
  color: #f0c3b9
}

@media(max-width:700px) {
  .site-footer {
    flex-wrap: wrap;
    gap: 12px
  }

  .site-footer .footer-links {
    flex-wrap: wrap;
    gap: 14px
  }
}

/* Guest Chapter One conversion */
.conversion-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 5, 7, .88);
  backdrop-filter: blur(12px);
  overflow: auto
}

.conversion-dialog {
  position: relative;
  width: min(1080px, 96vw);
  max-height: min(900px, calc(100dvh - 48px));
  overflow: auto;
  border: 1px solid rgba(220, 160, 180, .25);
  border-radius: 24px;
  background: radial-gradient(ellipse at 18% 0, rgba(120, 47, 72, .24), transparent 45%), linear-gradient(145deg, #1c1318, #100c0f 74%);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .62)
}

.conversion-close {
  position: absolute;
  z-index: 3;
  right: 16px;
  top: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid #59404b;
  border-radius: 50%;
  background: #1b1217;
  color: #e8d8de;
  font: 300 28px/1 'DM Sans', sans-serif;
  cursor: pointer
}

.conversion-layout {
  display: grid;
  grid-template-columns: minmax(270px, .78fr) minmax(0, 1.22fr);
  min-height: 620px
}

.conversion-book-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .025), rgba(0, 0, 0, .14));
  border-right: 1px solid rgba(255, 255, 255, .07)
}

.conversion-cover {
  width: min(315px, 100%);
  max-width: 315px;
  flex: none;
  box-shadow: -7px 12px 24px rgba(0, 0, 0, .32), 12px 25px 42px rgba(0, 0, 0, .38)
}

.conversion-book-meta {
  text-align: center;
  margin-top: 18px;
  max-width: 320px
}

.conversion-book-meta .eyebrow {
  font-size: 9px;
  letter-spacing: .22em;
  color: #dba0ad
}

.conversion-book-meta p {
  color: #a9979f;
  font-size: 12px;
  margin: 0
}

.conversion-main {
  display: flex;
  align-items: center;
  padding: 50px clamp(28px, 5vw, 62px)
}

.conversion-state {
  width: 100%;
  max-width: 560px;
  margin: auto
}

.conversion-state>.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  color: #e5a69e
}

.conversion-state>h2 {
  font: 500 clamp(29px, 3.1vw, 39px)/1.12 'Playfair Display', Georgia, serif;
  letter-spacing: -.025em;
  margin: 12px 0;
  color: #f4e4e2
}

.conversion-intro {
  color: #b8a6ac;
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 26px
}

.conversion-state>h3 {
  font: 700 10px/1.2 'DM Sans', sans-serif;
  letter-spacing: .17em;
  color: #d9b8bd;
  margin: 0 0 12px
}

.conversion-choices {
  display: grid;
  gap: 9px
}

.conversion-choices button {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 13px;
  text-align: left;
  width: 100%;
  min-height: 66px;
  padding: 12px 15px;
  border: 1px solid #49343e;
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
  color: #e8dce0;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s
}

.conversion-choices button:hover, .conversion-choices button:focus-visible {
  border-color: #cf8393;
  background: rgba(201, 116, 137, .10);
  outline: none;
  transform: translateY(-1px)
}

.conversion-choices button[aria-pressed="true"] {
  border-color: #df9c9e;
  background: rgba(210, 143, 151, .12)
}

.conversion-choices button:disabled {
  opacity: .55;
  cursor: wait
}

.conversion-choices small {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #a66b78;
  border-radius: 50%;
  font: 500 12px 'Playfair Display', Georgia, serif;
  color: #e8b4aa
}

.conversion-choices span {
  font-size: 13px;
  line-height: 1.45
}

.conversion-custom-label {
  margin: 19px 0 10px;
  color: #bdaab0;
  font: italic 14px 'Playfair Display', Georgia, serif
}

#conversionCustomMount .own {
  flex-direction: column;
  gap: 9px
}

#conversionCustomMount .own input {
  width: 100%;
  min-height: 49px;
  padding: 13px 15px;
  border: 1px solid #47323c;
  border-radius: 12px;
  color: #f0e5e8
}

#conversionCustomMount .own button {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #f2b6ac;
  color: #231419;
  font-weight: 700
}

#conversionCustomMount .own button:disabled {
  opacity: .6;
  cursor: wait
}

.conversion-error {
  min-height: 0;
  margin: 7px 0 0;
  color: #ffb4ad;
  font-size: 12px
}

.conversion-error:empty {
  display: none
}

.conversion-back {
  display: block;
  margin: 19px auto 0;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: #b99fa9;
  font: 500 12px 'DM Sans', sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer
}

.conversion-back:hover {
  color: #f0c1b8
}

.conversion-selected {
  position: relative;
  margin: 17px 0 22px;
  padding: 15px 17px;
  border-left: 2px solid #d88d96;
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, .035)
}

.conversion-selected small {
  color: #dba0a1;
  font-size: 9px;
  letter-spacing: .17em;
  font-weight: 700
}

.conversion-selected p {
  margin: 7px 0 4px;
  color: #e9d9dd;
  font: italic 14px/1.5 'Playfair Display', Georgia, serif
}

.conversion-selected button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #c99aa5;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer
}

.conversion-offer-heading {
  font: 500 22px 'Playfair Display', Georgia, serif;
  color: #f2dfdc;
  margin-bottom: 8px
}

.conversion-price {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: start;
  gap: 4px 10px
}

.conversion-price del {
  color: #97858c;
  font: 500 13px 'DM Sans', sans-serif
}

.conversion-price strong {
  color: #f4b7aa;
  font: 600 clamp(31px, 4vw, 42px)/1 'DM Sans', sans-serif;
  letter-spacing: -.045em
}

.conversion-price>span {
  grid-column: 1/-1;
  margin-top: 3px;
  color: #d9a19b;
  font: 700 9px 'DM Sans', sans-serif;
  letter-spacing: .16em
}

.conversion-value {
  margin: 15px 0 8px;
  color: #b8a6ac;
  font-size: 13px;
  line-height: 1.55
}

.conversion-payment {
  margin: 0 0 19px;
  color: #e1ced2;
  font: italic 14px 'Playfair Display', Georgia, serif
}

.conversion-unlock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(110deg, #f6c4b8, #e9a1a0);
  color: #241519;
  font: 700 14px 'DM Sans', sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(222, 145, 149, .18)
}

.conversion-unlock:hover {
  filter: brightness(1.06)
}

.conversion-account-note {
  text-align: center;
  color: #94828a;
  font-size: 11px;
  margin: 10px 0 0
}

.saved-direction {
  margin: 0 0 18px;
  padding: 14px 17px;
  border: 1px solid #59404b;
  border-radius: 14px;
  background: #1b1318;
  text-align: left
}

.saved-direction small {
  color: #d9a0a8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em
}

.saved-direction p {
  color: #e7d9dd;
  font: italic 14px/1.5 'Playfair Display', Georgia, serif;
  margin: 7px 0 12px
}

.saved-direction button {
  border: 0;
  background: transparent;
  padding: 0;
  color: #f0b6ac;
  font: 600 12px 'DM Sans', sans-serif;
  cursor: pointer
}

@media(max-width:760px) {
  .conversion-modal {
    place-items: start center;
    padding: 12px
  }

  .conversion-dialog {
    width: min(560px, 100%);
    max-height: calc(100dvh - 24px);
    border-radius: 19px
  }

  .conversion-layout {
    grid-template-columns: 1fr;
    min-height: 0
  }

  .conversion-book-panel {
    padding: 30px 24px 23px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07)
  }

  .conversion-cover {
    width: clamp(190px, 56vw, 245px)
  }

  .conversion-book-meta {
    margin-top: 14px
  }

  .conversion-main {
    padding: 28px 22px 25px
  }

  .conversion-state>h2 {
    font-size: 30px
  }

  .conversion-intro {
    margin-bottom: 20px
  }

  .conversion-close {
    right: 10px;
    top: 10px;
    width: 36px;
    height: 36px
  }
}

@media(max-width:390px) {
  .conversion-main {
    padding-left: 16px;
    padding-right: 16px
  }

  .conversion-choices button {
    grid-template-columns: 31px 1fr;
    gap: 10px;
    padding: 11px
  }

  .conversion-choices small {
    width: 29px;
    height: 29px
  }
}

.conversion-cover .cover-brand {
  padding-bottom: 8%
}

.conversion-cover .cover-brand-title.is-multiline,
.conversion-cover .cover-placeholder strong.is-multiline {
  font-size: clamp(20px, 13.5cqw, 74px);
  line-height: 1.08;
  padding-bottom: .2em
}

/* Recessed, debossed finish for cover lettering. */
.cover-brand-title, .cover-placeholder strong {
  filter: none;
  text-shadow: -.35px -.35px .6px rgba(12, 7, 6, .38), .35px .45px .6px rgba(255, 232, 185, .24), 0 1px 2px rgba(8, 4, 3, .26);
}

.page-num {
  -webkit-user-select: none;
  user-select: none
}

.reader-tools {
  display: flex;
  align-items: center;
  gap: 12px
}

.export-story {
  padding: 9px 14px;
  border: 1px solid #76515e;
  border-radius: 999px;
  background: #21161b;
  color: #f1dce3;
  font: 600 12px 'DM Sans', sans-serif;
  cursor: pointer
}

.export-story:hover {
  background: #3a202b;
  border-color: #c66887
}

@media(max-width:600px) {
  .reader-tools {
    gap: 6px
  }

  .export-story {
    padding: 8px 10px;
    font-size: 11px
  }
}

.reset-story {
  padding: 9px 14px;
  border: 1px solid #80434c;
  border-radius: 999px;
  background: #281317;
  color: #f0c5c7;
  font: 600 12px 'DM Sans', sans-serif;
  cursor: pointer
}

.reset-story:hover {
  background: #472027;
  border-color: #c66b73
}

.reset-story:disabled {
  opacity: .6;
  cursor: wait
}

.chapter-generating {
  max-width: 580px;
  margin: 25px auto;
  padding: 24px;
  border: 1px solid #493440;
  border-radius: 16px;
  background: #1b1317
}

.chapter-generating p {
  color: #b8aeb3;
  line-height: 1.65
}

.book {
  position: relative
}

.writing-indicator {
  position: absolute;
  right: 42px;
  bottom: 22px;
  z-index: 3;
  color: #8b7771;
  font: italic 13px 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .2px;
  pointer-events: none
}

.writing-indicator.error {
  color: #9c5656
}

@media(max-width:850px) {
  .writing-indicator {
    right: 28px;
    bottom: 18px;
    font-size: 12px
  }
}

/* Lush Fiction V2.9 — in-book thinking state for Chapter 2+ */
.chapter-thinking {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  color: #8a6f72;
  font: italic 400 16px/1.5 'Libre Baskerville', Georgia, serif;
}

.chapter-thinking span {
  animation: chapter-thinking-fade 1.45s ease-in-out infinite
}

.chapter-thinking i {
  display: inline-block;
  color: #a95d70;
  font: normal 13px/1 Georgia, serif;
  transform-origin: center;
  animation: chapter-thinking-heart 1.45s ease-in-out infinite;
}

@keyframes chapter-thinking-fade {
  0%, 100% {
    opacity: .48
  }

  50% {
    opacity: 1
  }
}

@keyframes chapter-thinking-heart {
  0%, 100% {
    transform: scale(.92);
    opacity: .55
  }

  45% {
    transform: scale(1.12);
    opacity: 1
  }

  60% {
    transform: scale(.98);
    opacity: .78
  }
}

@media(prefers-reduced-motion:reduce) {
  .chapter-thinking span, .chapter-thinking i {
    animation: none;
    opacity: .8
  }
}


/* Create — Inspire Me */
.inspire-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 38px;
  padding: 18px 20px 18px 24px;
  border: 1px solid rgba(224, 164, 177, .22);
  border-radius: 16px;
  background: linear-gradient(110deg, rgba(124, 55, 76, .16), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025)
}

.inspire-strip>div {
  display: flex;
  flex-direction: column;
  gap: 4px
}

.inspire-strip strong {
  color: #f0dfe2;
  font: 500 16px/1.25 'Libre Baskerville', Georgia, serif
}

.inspire-strip span {
  color: #a9969d;
  font: 400 12px/1.5 'DM Sans', sans-serif
}

.inspire-button {
  flex: none;
  min-width: 142px;
  padding: 12px 18px;
  border: 1px solid #a76a79;
  border-radius: 999px;
  background: rgba(193, 105, 128, .11);
  color: #f0c1bd;
  font: 700 12px/1 'DM Sans', sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .18s, border-color .18s, background .18s
}

.inspire-button>span {
  margin-right: 7px;
  color: #efb1a8
}

.inspire-button:hover {
  transform: translateY(-1px);
  border-color: #df9aa6;
  background: rgba(193, 105, 128, .18)
}

.inspire-button:disabled {
  opacity: .62;
  cursor: wait;
  transform: none
}

.inspire-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  min-width: 190px
}

.inspire-status {
  max-width: 260px;
  min-height: 16px;
  color: #bfa9b0;
  font: 500 11px/1.35 'DM Sans', sans-serif;
  text-align: right;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .2s, transform .2s
}

.inspire-status.visible {
  opacity: 1;
  transform: none
}

.inspire-button.is-dreaming {
  opacity: 1;
  background: rgba(193, 105, 128, .2);
  border-color: #d88e9f;
  box-shadow: 0 0 0 4px rgba(193, 105, 128, .06)
}

.inspire-button.is-dreaming .inspire-spark {
  display: inline-block;
  animation: inspireSpark 1.05s ease-in-out infinite
}

.inspire-button.is-dreaming .inspire-label {
  animation: inspireDream 1.4s ease-in-out infinite
}

@keyframes inspireSpark {
  0%, 100% {
    transform: scale(.82) rotate(-8deg);
    opacity: .5
  }

  50% {
    transform: scale(1.22) rotate(10deg);
    opacity: 1
  }
}

@keyframes inspireDream {
  0%, 100% {
    opacity: .62
  }

  50% {
    opacity: 1
  }
}

@media(max-width:620px) {
  .inspire-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    margin-bottom: 30px
  }

  .inspire-action {
    width: 100%;
    align-items: stretch
  }

  .inspire-button {
    width: 100%
  }

  .inspire-status {
    max-width: none;
    text-align: center
  }
}

.book-menu-popover .create-cover:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none
}

/* Move header logo down slightly */
header .brand-logo {
  position: relative;
  top: 10px;
}


/* Elegant editorial book-cover typography */

.cover-brand {
  justify-content: flex-end;
  align-items: center;
  padding: 7% 7% 11%;
  text-align: center;
}

.cover-brand-title,
.cover-placeholder strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.04em;
  font-size: clamp(40px, 9cqw, 52px);
  line-height: 0.95;
  padding-bottom: 0.2em;
  color: #fff1e3;
  background: linear-gradient(180deg,
      #fffaf2 0%,
      #f8e9d9 55%,
      #e8d1bc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.12);
  width: 82%;
  max-width: 82%;
  margin: 0 auto 22px;
  text-align: center;
  text-align-last: center;
  text-indent: 0;
  text-wrap: balance;
}

.cover-brand-title.is-multiline,
.cover-brand-title.is-three-word.is-multiline,
.cover-brand-title.is-long-multiline,
.cover-placeholder strong.is-multiline,
.cover-placeholder strong.is-three-word.is-multiline,
.cover-placeholder strong.is-long-multiline {
    position: static;
    left: auto;
    width: 82%;
    max-width: 82%;
    padding: 0 0 0.2em;
    text-indent: 0;
    text-align-last: center;
    font-size: clamp(40px, 9cqw, 52px);
    line-height: 0.95;
}

/* Long words get a smaller title without changing every other cover. */
.cover-brand-title.is-wide-word,
.cover-placeholder strong.is-wide-word {
  font-size: clamp(32px, 8.2cqw, 48px);
}

/* Small publisher branding */

.cover-brand-footer {
  gap: 0;
}

.cover-brand-footer::before,
.cover-brand-footer::after,
.cover-placeholder strong::after {
  display: none;
}

.cover-brand-footer .cover-original,
.cover-placeholder-author {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: clamp(7px, 2.1cqw, 11px);
  font-weight: 500;
  font-style: normal;
  letter-spacing: .24em;
  line-height: 1.5;
  color: #eee2db;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .7);
}

/* Shared Reader: match Bookshelf typography */
.share-book-cover .cover-brand-title,
.share-book-cover .cover-placeholder strong {
  font-size: 14cqw;
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 0.95;
  width: 82%;
  max-width: 82%;
}

.share-book-cover .cover-brand-title.is-wide-word,
.share-book-cover .cover-placeholder strong.is-wide-word {
  font-size: 12cqw;
}
.share-book-cover .cover-brand-title.is-long-multiline,
.share-book-cover .cover-placeholder strong.is-long-multiline {
  font-size: 12cqw;
  line-height: 1;
}
.share-book-cover .cover-brand {
  padding-bottom: 14%;
}

/* Bookshelf: adjust long-word titles only */
.library-grid .cover-brand-title.is-wide-word {
  font-size: 32px;
  line-height: 1;
}

.featured-cover .cover-brand-title.is-wide-word {
  font-size: 28px;
  line-height: 1;
}

/* Extra-long words on small covers */
.library-grid .cover-brand-title.is-wide-word,
.library-grid .cover-placeholder strong.is-wide-word {
  font-size: 25px;
  width: 100%;
  max-width: 100%;
  overflow-wrap: normal;
}

.featured-cover .cover-brand-title.is-wide-word,
.featured-cover .cover-placeholder strong.is-wide-word {
  font-size: 25px;
  width: 100%;
  max-width: 100%;
  overflow-wrap: normal;
}

/* Improve title readability on light cover images */
.book-cover .cover-brand {
  background: linear-gradient(
    to bottom,
    transparent 35%,
    rgba(12, 7, 10, 0.12) 50%,
    rgba(12, 7, 10, 0.48) 72%,
    rgba(12, 7, 10, 0.82) 100%
  );
}
/* Bookshelf and Account: lower the logo and divider,
   keeping the navigation in its original position. */
body.bookshelf-view header,
body.account-view header {
  height: 135px;
  padding-bottom: 0;
}

body.bookshelf-view header .brand-logo,
body.account-view header .brand-logo {
  top: -1px;
  translate: none;
}

body.bookshelf-view header .main-nav,
body.account-view header .main-nav,
body.bookshelf-view header .header-actions,
body.account-view header .header-actions {
  position: relative;
  top: 12px;
}

/* Bookshelf concept: featured story and atmospheric hero. */
body.bookshelf-view #bookshelfView .library {max-width: min(1400px, calc(100% - 60px));padding-top:0;}
body.bookshelf-view .bookshelf-hero {
  position:relative;isolation:isolate;min-height:480px;
  padding:42px 0 28px;margin-bottom:18px;
}
body.bookshelf-view .bookshelf-hero::before {
  content:"";position:absolute;z-index:-1;pointer-events:none;
  top:-135px;bottom:-18px;left:0;right:0;
  background:linear-gradient(90deg,#100c0c 0%,rgba(16,12,12,.94) 31%,rgba(16,12,12,.44) 58%,rgba(16,12,12,.08) 100%),
             linear-gradient(0deg,#100c0c 0%,transparent 30%),
             url('/images/bookshelf_hero.jpeg') right center / auto 100% no-repeat;
}
body.bookshelf-view .bookshelf-hero .library-head {margin:0 0 24px;display:block;}
body.bookshelf-view .bookshelf-hero-eyebrow {font:700 11px/1.5 'DM Sans',sans-serif;letter-spacing:2.6px;color:#e8c1b6;margin-bottom:6px;}
body.bookshelf-view .bookshelf-hero .library-head h2 {font:400 clamp(36px,4vw,54px)/1.1 'Playfair Display',Georgia,serif;letter-spacing:-.025em;color:#f7f0ed;margin:0 0 8px;}
body.bookshelf-view .bookshelf-hero .library-head p {font-size:17px;color:#d4c7c4;margin:0;}
body.bookshelf-view .bookshelf-hero .library-featured {
  width: min(760px, 100%);
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 36px;
  margin: 0;
  padding: 22px 28px;
  border-radius: 22px;

  background: linear-gradient(
    90deg,
    rgba(65, 35, 37, 0.88) 0%,
    rgba(53, 31, 33, 0.68) 48%,
    rgba(38, 24, 26, 0.22) 85%,
    transparent 100%
  );

  border: 1px solid rgba(244, 186, 172, 0.12);
  backdrop-filter: blur(3px);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.16);
}
body.bookshelf-view .bookshelf-hero .featured-book-art .book-cover {max-width:185px;}
body.bookshelf-view .bookshelf-hero .featured-book-copy h3 {font-size:clamp(30px,3vw,43px);font-weight:400;}
body.bookshelf-view .bookshelf-hero .featured-progress {color:#f4bdb3;}
body.bookshelf-view .bookshelf-hero .featured-note {color:#d3c3c1;line-height:1.5;margin-bottom:18px;}
body.bookshelf-view .bookshelf-hero .featured-continue,
body.bookshelf-view .bookshelf-create-button {background:linear-gradient(110deg,#ffd8d0,#ffb3ae);color:#2b1718;border:0;border-radius:999px;padding:13px 24px;font-weight:700;cursor:pointer;}
body.bookshelf-view .bookshelf-hero .featured-book-copy>small {color:#c3aaa6;}
body.bookshelf-view .library-collection-head {display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:0 0 22px;padding:0;border:0;}
body.bookshelf-view .library-collection-head>div:first-child {margin-right:auto;}
body.bookshelf-view .library-collection-head h3 {font:400 38px/1.2 'Playfair Display',Georgia,serif;color:#f5eae7;}
body.bookshelf-view .bookshelf-collection-intro {font-size:14px;color:#c4b6b5;margin:3px 0 0;}
body.bookshelf-view .library-collection-head .bookshelf-create-button {white-space:nowrap;}
@media(max-width:700px){
  body.bookshelf-view #bookshelfView .library {max-width:calc(100% - 32px);}
  body.bookshelf-view .bookshelf-hero {padding-top:34px;min-height:0;}
  body.bookshelf-view .bookshelf-hero::before {top:-70px;left:-16px;right:-16px;background-position:right center;background-size:auto 100%;}
  body.bookshelf-view .bookshelf-hero .library-featured {grid-template-columns:115px minmax(0,1fr);gap:18px;padding:17px;text-align:left;}
  body.bookshelf-view .bookshelf-hero .featured-book-art .book-cover {max-width:115px;}
  body.bookshelf-view .bookshelf-hero .featured-book-copy h3 {font-size:27px;}
  body.bookshelf-view .bookshelf-hero .featured-note {font-size:13px;}
  body.bookshelf-view .library-collection-head h3 {font-size:31px;}
}
@media(max-width:420px){body.bookshelf-view .bookshelf-hero .library-featured{grid-template-columns:1fr;text-align:center;}body.bookshelf-view .bookshelf-hero .featured-book-art .book-cover{margin:auto;}body.bookshelf-view .library-collection-head .bookshelf-create-button{width:100%;}}

/* Bookshelf polish — header readability, reading progress, search and sorting. */
body.bookshelf-view header {background:linear-gradient(180deg,rgba(15,10,11,.96),rgba(15,10,11,.84) 75%,rgba(15,10,11,.62));position:relative;z-index:20;}
body.bookshelf-view .bookshelf-reading-progress {display:flex;align-items:center;gap:12px;margin-top:18px;color:#d4bfc0;font:12px/1.3 'DM Sans',sans-serif;}
body.bookshelf-view .bookshelf-progress-track {width:min(245px,70%);height:7px;background:rgba(255,221,216,.17);border-radius:999px;overflow:hidden;}
body.bookshelf-view .bookshelf-progress-track span {display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffb7b4,#f7a5ad);transition:width .25s ease;}
body.bookshelf-view .bookshelf-tools {display:flex;align-items:center;gap:12px;margin-left:auto;}
body.bookshelf-view .bookshelf-search {display:flex;align-items:center;gap:9px;width:250px;border:1px solid rgba(255,222,216,.25);border-radius:999px;padding:11px 15px;color:#e8c4c3;background:rgba(28,19,21,.72);}
body.bookshelf-view .bookshelf-search span {font-size:23px;line-height:14px;}
body.bookshelf-view .bookshelf-search input {width:100%;min-width:0;background:transparent;border:0;outline:0;color:#fff;font:13px 'DM Sans',sans-serif;}
body.bookshelf-view .bookshelf-search input::placeholder {color:#b8a9a8;}
body.bookshelf-view .bookshelf-tools select {border:1px solid rgba(255,222,216,.25);border-radius:999px;padding:11px 28px 11px 15px;color:#f8e9e7;background:#24191b;font:13px 'DM Sans',sans-serif;cursor:pointer;}
body.bookshelf-view .book-card[hidden],body.bookshelf-view .bookshelf-no-results[hidden] {display:none!important;}
body.bookshelf-view .bookshelf-no-results {color:#d6bfc0;text-align:center;padding:32px 0;}
@media(max-width:1050px){body.bookshelf-view .bookshelf-tools{order:3;width:100%;margin-left:0;}body.bookshelf-view .bookshelf-search{flex:1;width:auto;}}
@media(max-width:550px){body.bookshelf-view .bookshelf-tools{flex-wrap:wrap;}body.bookshelf-view .bookshelf-search{flex-basis:100%;}body.bookshelf-view .bookshelf-tools select{flex:1;}body.bookshelf-view .bookshelf-reading-progress{justify-content:center;}}

/* The complete featured book card is clickable. */
body.bookshelf-view .bookshelf-hero .library-featured:not(.hidden){cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease;}
body.bookshelf-view .bookshelf-hero .library-featured:not(.hidden):hover{border-color:rgba(255,211,201,.38);box-shadow:0 27px 70px rgba(0,0,0,.24);}
body.bookshelf-view .bookshelf-hero .library-featured:focus-visible{outline:2px solid #f2b5a8;outline-offset:4px;}

/* Bookshelf finishing touches — collection typography, search and individual progress. */
body.bookshelf-view .library-collection-head h3 {font:400 clamp(36px,4vw,54px)/1.1 'Playfair Display',Georgia,serif;letter-spacing:-.025em;color:#f7f0ed;margin:0 0 8px;}
body.bookshelf-view .library-collection-head>div:first-child>span {font:700 11px/1.5 'DM Sans',sans-serif;letter-spacing:2.6px;color:#e8c1b6;margin-bottom:6px;}
body.bookshelf-view .library-count {display:none!important;}
body.bookshelf-view .bookshelf-search {width:205px;min-height:48px;padding:0 14px;gap:10px;cursor:text;}
body.bookshelf-view .bookshelf-search span {font-size:22px;line-height:1;flex:none;}
body.bookshelf-view .bookshelf-search input[type="search"] {display:block;flex:1;width:100%;height:44px;min-width:0;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;outline:0!important;color:#fff;font:13px 'DM Sans',sans-serif;}
body.bookshelf-view .bookshelf-search:focus-within {border-color:#f4b7b1;box-shadow:0 0 0 2px rgba(244,183,177,.13);}
body.bookshelf-view .bookshelf-search input::-webkit-search-cancel-button {cursor:pointer;}
body.bookshelf-view .book-card-progress {display:flex;align-items:center;gap:9px;margin:12px 0 4px;min-width:0;}
body.bookshelf-view .book-card-progress-track {height:5px;flex:1;min-width:0;background:rgba(255,221,216,.17);border-radius:999px;overflow:hidden;}
body.bookshelf-view .book-card-progress-track>span {display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffb7b4,#f7a5ad);}
body.bookshelf-view .book-card-progress small {flex:none;color:#b9a4a5;font:10px 'DM Sans',sans-serif;white-space:nowrap;}
@media(max-width:1050px){body.bookshelf-view .bookshelf-search{width:auto;flex:1;}}
@media(max-width:700px){body.bookshelf-view .library-collection-head h3{font-size:clamp(36px,8vw,46px);}}

/* Bookshelf: aligned toolbar and compact reading buttons (30 Sep). */
body.bookshelf-view .library-collection-head {align-items:center;}
body.bookshelf-view .bookshelf-tools {display:flex;align-items:center;gap:12px;min-width:0;}
body.bookshelf-view .bookshelf-search {width:310px;min-width:220px;height:48px;min-height:48px;margin:0;padding:0 16px;flex:none;}
body.bookshelf-view .bookshelf-search input[type="search"] {height:46px;line-height:46px;}
body.bookshelf-view .bookshelf-tools select {box-sizing:border-box;width:210px;height:48px;min-height:48px;margin:0;padding:0 34px 0 16px;flex:none;}
body.bookshelf-view .library-collection-head .bookshelf-create-button {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:48px;margin:0;padding:0 23px;line-height:1.2;flex:none;}
body.bookshelf-view .book-actions {margin-top:14px;}
body.bookshelf-view .continue-book {display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:999px;background:linear-gradient(110deg,#ffd8d0,#ffb3ae);color:#2b1718;padding:9px 15px;font:700 11px/1.3 'DM Sans',sans-serif;white-space:nowrap;box-shadow:0 5px 14px rgba(0,0,0,.14);transition:filter .2s,transform .2s;}
body.bookshelf-view .continue-book span {margin:0;}
body.bookshelf-view .continue-book:hover {filter:brightness(1.06);transform:translateY(-1px);}
body.bookshelf-view .book-card-progress {margin:15px 0 3px;}
@media(max-width:1250px){body.bookshelf-view .bookshelf-tools{order:3;width:100%;margin-left:0;}body.bookshelf-view .bookshelf-search{flex:1;width:auto;min-width:0;}body.bookshelf-view .bookshelf-tools select{flex:0 0 210px;}}
@media(max-width:550px){body.bookshelf-view .bookshelf-tools{flex-wrap:wrap;}body.bookshelf-view .bookshelf-search{flex-basis:100%;}body.bookshelf-view .bookshelf-tools select{flex:1;width:auto;}}
