.bbb-reader-flow {
  --reader-workspace-paper: #151115;
  --reader-workspace-panel: #1b171a;
  --reader-workspace-line: rgba(255, 255, 255, .14);
  --reader-workspace-text: #fff9fc;
  --reader-workspace-muted: #c9bec4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(720px, 100%);
  margin: 0 auto 32px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: #100d0f;
}

.bbb-reader-page-header {
  grid-column: 1 / -1 !important;
  width: 100%;
  padding: 28px 0 52px;
}

.bbb-reader-page-header .bbb-reader-flow { margin-bottom: 52px; }

.bbb-reader-page-header__copy {
  width: min(760px, 100%);
  margin-inline: auto;
  text-align: center;
}

.bbb-reader-page-header__copy > p {
  margin: 0 0 12px;
  color: var(--reader-flow-accent, #ff8ac7) !important;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.bbb-reader-page-header__copy h1 {
  margin: 0;
  color: var(--reader-workspace-text, #fff9fc) !important;
  font-family: var(--font-heading-family, Georgia, serif);
  font-size: clamp(48px, 7vw, 82px) !important;
  font-weight: 500;
  letter-spacing: -.04em !important;
  line-height: .98 !important;
  text-transform: lowercase;
}

.bbb-reader-page-header__copy > div {
  width: min(620px, 100%);
  margin: 18px auto 0;
  color: var(--reader-workspace-muted, #c9bec4);
  font-size: 18px;
  line-height: 1.55;
}

.bbb-reader-flow a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .72);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-transform: lowercase;
}

.bbb-reader-flow a:hover,
.bbb-reader-flow a:focus-visible { color: #fff; }
.bbb-reader-flow a.is-active {
  background: var(--reader-flow-accent, #ff8ac7);
  color: #171014;
}

.bbb-account-shelf__wrap > .bbb-reader-flow,
.bbb-account-shelf__wrap > .bbb-account-profile__app {
  grid-column: 1 / -1 !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__app {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__section,
body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__membershipPanel {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 22px !important;
  overflow: hidden !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__sectionHeader {
  padding: 24px 28px !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__sectionHeader h2 {
  margin: 0 !important;
  font-size: clamp(28px, 3vw, 40px) !important;
  line-height: 1.05 !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-shelf__panel {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 28px !important;
  overflow: hidden !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-shelf__purchaseList,
body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-shelf__quiet {
  display: none !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__membershipPanel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__societyCard,
body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__preferences {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 30px !important;
  overflow: hidden !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__societyCard {
  display: block !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__preferences--pwa {
  display: none !important;
}

@media (display-mode: standalone) {
  body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__preferences--pwa {
    display: block !important;
  }
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__stats {
  display: none !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-welcome {
  display: none !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-welcome__emojiRain,
body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-welcome__scene {
  display: none !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-welcome__copy {
  display: block !important;
  width: 100% !important;
  max-width: 820px !important;
  margin-inline: auto !important;
  text-align: center !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-welcome__meta {
  justify-content: center !important;
}

body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-welcome__readerProfile {
  width: 100% !important;
  max-width: 760px !important;
  margin: 32px auto 0 !important;
  text-align: left !important;
}

/* One readable visual system across the complete reader workspace. */
.bbb-account-shelf[data-account-shelf],
.sss-lib--mfy-page {
  --reader-workspace-paper: #110e10;
  --reader-workspace-panel: #1a1619;
  --reader-workspace-panel-strong: #201a1e;
  --reader-workspace-line: rgba(255, 255, 255, .15);
  --reader-workspace-text: #fff9fc;
  --reader-workspace-muted: #c9bec4;
  background: var(--reader-workspace-paper) !important;
  color: var(--reader-workspace-text) !important;
}

.sss-lib--mfy-page {
  margin-top: 30px !important;
  padding-top: 26px !important;
}

.sss-lib--mfy-page .bbb-reader-page-header { margin-top: -38px; }

.bbb-account-shelf[data-account-shelf] > .bbb-account-shelf__wrap,
.sss-lib--mfy-page > .sss-lib__wrap {
  display: block !important;
  box-sizing: border-box !important;
  width: min(1180px, calc(100% - 48px)) !important;
  max-width: none !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

.bbb-account-shelf__wrap > .bbb-reader-page-header,
.sss-lib__wrap > .bbb-reader-page-header {
  display: block !important;
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  order: -100 !important;
}

.bbb-account-shelf[data-account-shelf] .bbb-reader-flow,
.sss-lib--mfy-page .bbb-reader-flow {
  border-color: color-mix(in srgb, var(--reader-flow-accent, #ff8ac7) 38%, transparent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}

.bbb-account-shelf[data-account-shelf] h1,
.bbb-account-shelf[data-account-shelf] h2,
.bbb-account-shelf[data-account-shelf] h3,
.sss-lib--mfy-page h1,
.sss-lib--mfy-page h2,
.sss-lib--mfy-page h3 { color: var(--reader-workspace-text) !important; }

.bbb-account-shelf[data-account-shelf] p,
.bbb-account-shelf[data-account-shelf] small,
.bbb-account-shelf[data-account-shelf] em,
.sss-lib--mfy-page p,
.sss-lib--mfy-page small,
.sss-lib--mfy-page .sss-lib__sub { color: var(--reader-workspace-muted) !important; }

.bbb-account-shelf[data-account-shelf] .bbb-account-shelf__kicker,
.bbb-account-shelf[data-account-shelf] .bbb-account-shelf__toolbarKicker,
.bbb-account-shelf[data-account-shelf] .bbb-account-profile__cardLabel,
.sss-lib--mfy-page .sss-lib__kicker,
.sss-lib--mfy-page .sss-mfy__eyebrow,
.sss-lib--mfy-page .sss-mfy__sectionTitle {
  color: var(--reader-flow-accent, #ff8ac7) !important;
}

.bbb-account-shelf[data-account-shelf] .bbb-account-shelf__hero,
.bbb-account-shelf[data-account-shelf] .bbb-account-welcome,
.sss-lib--mfy-page .sss-lib__head {
  max-width: 920px;
  margin-inline: auto;
  text-align: center;
}

.bbb-account-shelf[data-account-shelf] .bbb-account-shelf__title,
.bbb-account-shelf[data-account-shelf] .bbb-account-welcome h1,
.sss-lib--mfy-page .sss-lib__title {
  font-size: clamp(42px, 6vw, 76px) !important;
  line-height: 1 !important;
  letter-spacing: -.035em !important;
}

.bbb-account-shelf[data-account-shelf] .bbb-account-shelf__sub,
.sss-lib--mfy-page .sss-lib__sub {
  max-width: 660px;
  margin-inline: auto;
  font-size: clamp(16px, 1.8vw, 20px) !important;
  line-height: 1.55 !important;
}

.bbb-account-shelf[data-account-shelf] .bbb-account-shelf__current,
.bbb-account-shelf[data-account-shelf] .bbb-account-shelf__status,
.bbb-account-shelf[data-account-shelf] .bbb-account-profile__stats,
.bbb-account-shelf[data-account-shelf] .bbb-account-profile__section,
.bbb-account-shelf[data-account-shelf] .bbb-account-welcome__readerProfile,
.sss-lib--mfy-page .sss-mfy__quiz,
.sss-lib--mfy-page .sss-mfy__dashboard,
.sss-lib--mfy-page .sss-mfy__module,
.sss-lib--mfy-page .sss-mfy__card {
  border: 1px solid var(--reader-workspace-line) !important;
  border-radius: 18px !important;
  background: var(--reader-workspace-panel) !important;
  box-shadow: none !important;
}

.bbb-account-shelf[data-account-shelf] button,
.bbb-account-shelf[data-account-shelf] input,
.bbb-account-shelf[data-account-shelf] select,
.sss-lib--mfy-page button,
.sss-lib--mfy-page input,
.sss-lib--mfy-page select {
  min-height: 44px;
  font-size: 16px;
}

.bbb-account-shelf[data-account-shelf] :focus-visible,
.sss-lib--mfy-page :focus-visible {
  outline: 3px solid color-mix(in srgb, var(--reader-flow-accent, #ff8ac7) 72%, white);
  outline-offset: 3px;
}

.bbb-account-shelf[data-account-shelf] .bbb-account-shelf__button:not(.bbb-account-shelf__button--ghost),
.sss-lib--mfy-page .sss-lib__finderBtn:not(.sss-lib__finderBtn--ghost),
.sss-lib--mfy-page .sss-mfy__options button:hover,
.sss-lib--mfy-page .sss-mfy__options button.is-active {
  background: var(--reader-flow-accent, #ff8ac7) !important;
  color: #171014 !important;
}

.bbb-account-shelf[data-account-shelf] .bbb-account-shelf__grid,
.sss-lib--mfy-page .sss-mfy__grid { gap: 18px !important; }

/* Bookshelf has one job: manage saved books and reading status. */
body .bbb-account-shelf[data-account-shelf]:not(.bbb-account-home) .bbb-account-shelf__snapshot,
body .bbb-account-shelf[data-account-shelf]:not(.bbb-account-home) .bbb-account-shelf__readerProfile,
body .bbb-account-shelf[data-account-shelf]:not(.bbb-account-home) .bbb-account-shelf__spiceProfile,
body .bbb-account-shelf[data-account-shelf]:not(.bbb-account-home) .bbb-account-shelf__feature,
body .bbb-account-shelf[data-account-shelf]:not(.bbb-account-home) .bbb-account-shelf__ratings,
body .bbb-account-shelf[data-account-shelf]:not(.bbb-account-home) .bbb-account-shelf__lanes { display: none !important; }

.bbb-account-shelf:not(.bbb-account-home) .bbb-account-shelf__syncSpiceRow {
  display: block !important;
  margin-block: 20px 28px;
}

.bbb-account-shelf:not(.bbb-account-home) .bbb-account-shelf__hero { margin-bottom: 28px; }
.bbb-account-shelf:not(.bbb-account-home) .bbb-account-shelf__hero--actionsOnly {
  margin-top: -28px;
  text-align: center;
}
.bbb-account-shelf:not(.bbb-account-home) .bbb-account-shelf__hero--actionsOnly .bbb-account-shelf__memberBadge { display: none; }
.bbb-account-shelf:not(.bbb-account-home) .bbb-account-shelf__hero--actionsOnly .bbb-account-shelf__actions { justify-content: center; }
.bbb-account-shelf:not(.bbb-account-home) .bbb-account-shelf__sectionHead { margin-top: 0; }

/* Account is the control center, not a second bookshelf or recommendation page. */
body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-shelf__spiceProfile,
body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__monthlyEra,
body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__section--quickLinks { display: none !important; }

.sss-lib--mfy-page .bbb-reader-flow { margin-top: 8px; }

@media (max-width: 749px) {
	.sss-lib--mfy-page .bbb-reader-page-header { margin-top: -46px; }
	.bbb-account-shelf[data-account-shelf] > .bbb-account-shelf__wrap,
	.sss-lib--mfy-page > .sss-lib__wrap { width: calc(100% - 28px) !important; }
	.bbb-reader-page-header { padding: 16px 0 34px; }
	.bbb-reader-page-header .bbb-reader-flow { margin-bottom: 34px; }
	.bbb-reader-page-header__copy h1 { font-size: 44px !important; }
	.bbb-reader-page-header__copy > div { font-size: 16px; }
	body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-shelf__panel,
	body .bbb-account-shelf.bbb-account-home[data-account-shelf] .bbb-account-profile__societyCard {
		grid-template-columns: 1fr !important;
		padding: 22px !important;
	}
  .bbb-reader-flow {
    width: 100%;
    margin-bottom: 22px;
  }

  .bbb-reader-flow a {
    min-height: 40px;
    padding: 8px 6px;
    font-size: 12px;
  }

  .bbb-account-shelf:not(.bbb-account-home) .bbb-account-shelf__actions .bbb-account-shelf__button--ghost { display: none; }
}
