/* Pilcrow — final interaction overrides. Loaded after spike.css on purpose. */

#space-root,
#space-root + .reader-app { will-change: opacity, transform; }
.world-enter { opacity: 0; transform: translateX(12px); }
.world-exit { pointer-events: none; }
.world-exit-active { opacity: 0; transform: translateX(-12px); }

/* Match the lower navigation rhythm from the prototype. */
.space-bottom-nav-items { padding: 36px 12px 0; }
.reader-main-nav { padding: 30px 12px 0; }
.reader-main-library-icon img,
.reader-main-nav .is-active .reader-main-library-icon img {
  filter: none;
  opacity: 1;
}
.reader-main-nav button.is-active { color: #7a5dff; }

/* Reader chrome must float over the text instead of changing the EPUB height. */
.reader-shell:not([hidden]) { display: block; overscroll-behavior-x: none; }
.reader-shell[hidden] { display: none !important; }
.reader-stage { position: absolute; inset: 0; height: 100%; }
.reading-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  transition: opacity .32s ease, transform .48s cubic-bezier(.2,.75,.2,1);
}
.reader-homebar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  transition: opacity .32s ease, transform .48s cubic-bezier(.2,.75,.2,1);
}
.reader-controls-hidden .reading-header {
  height: 91px;
  min-height: 91px;
  flex-basis: 91px;
  overflow: visible;
  opacity: 0;
  transform: translateY(-108%);
}
.reader-controls-hidden .reader-homebar {
  height: 149px;
  flex-basis: 149px;
  overflow: visible;
  opacity: 0;
  transform: translateY(108%);
}
.library-screen { overscroll-behavior-x: none; }

/* v43 — interaction repairs. This layer deliberately wins over the older
   prototype CSS, which contains several historical versions of these rules. */

/* Space: restore a compact four-item dock instead of the oversized interim one. */
.space-bottom-nav {
  height: 86px !important;
  border-radius: 24px 24px 0 0;
}
.space-bottom-nav-items {
  height: 70px !important;
  gap: 0 !important;
  padding: 14px 28px 0 !important;
}
.space-bottom-nav-items button {
  gap: 4px;
  font-size: 9px;
}
.space-nav-icon {
  width: 18px;
  height: 18px;
}
.space-home-indicator {
  bottom: 6px;
  width: 108px;
  height: 4px;
}

/* The card itself opens the book; controls inside it must remain tappable. */
.space-reading-copy,
.space-reading-status,
.space-reading-status > button,
.space-status-menu,
.space-status-menu button {
  pointer-events: auto !important;
}
.space-reading-card.is-status-open { overflow: visible; z-index: 10; }

/* Cloud catalogue cards may bring a real public cover URL; local Reader
   covers remain untouched. */
.space-cover > img.space-cover-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.space-cover--remote { background: #727272; }
.space-cover--remote > img.space-cover-fallback {
  width: 28%;
  height: auto;
  opacity: .72;
}
.space-cover--remote > img.space-cover-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.space-catalog-loading,
.space-catalog-list-title { width: 306px; margin: 18px 0 10px; color: #fbd096; }
.space-catalog-loading { padding: 22px 0; color: #918a82; font-size: 13px; }
.space-catalog-list-title { font-size: 17px; line-height: 1.1; }
.space-catalog-cta {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}
.space-catalog-cta i {
  padding-left: 12px;
  color: rgb(217 217 217 / 56%);
  font-size: 9.6px;
  font-style: normal;
  font-weight: 300;
}
.space-catalog-cta b {
  display: grid;
  width: 98px;
  height: 28px;
  border-radius: 13.29px;
  place-items: center;
  background: var(--space-peach);
  color: var(--space-black);
  font-size: 9.6px;
  font-weight: 300;
}

/* Prevent Safari from auto-zooming the Explore search input on focus. */
@media (max-width: 719px) {
  .space-search input { font-size: 16px; }
}

/* Reader/Main: compact dock and a correctly assembled shelf glyph. */
.reader-main-nav {
  height: 86px;
  flex-basis: 86px;
  padding: 15px 12px 0 !important;
}
.reader-main-library-icon img {
  filter: grayscale(1) brightness(0) invert(1) !important;
  opacity: .9;
  object-fit: fill;
}
.reader-main-library-icon img:nth-child(1) { top: 1px; left: 0; width: 17px; height: 2px; }
.reader-main-library-icon img:nth-child(2) { top: 8px; left: 0; width: 17px; height: 2px; }
.reader-main-library-icon img:nth-child(3) { top: 15px; left: 0; width: 17px; height: 2px; }
.reader-main-library-icon img:nth-child(4) { top: 0; right: 0; left: auto; width: 7px; height: 20px; }
.reader-main-nav .is-active .reader-main-library-icon img {
  filter: none !important;
  opacity: 1;
}

/* The selected Reader status stays in place; choices unfold neatly below it. */
.featured-book-card.is-status-open { margin-bottom: 112px; }
.featured-book-card.is-status-open .book-status-panel {
  width: 189px;
  height: 164px;
  overflow: visible;
  border-radius: 16.75px;
}
.featured-book-card.is-status-open .book-status-chip { width: 98px; }
.status-menu {
  top: 39px;
  right: 3.5px;
  left: 3.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform: translateY(-4px);
  animation: reader-status-menu-in .26s cubic-bezier(.2,.75,.2,1) .03s forwards;
}
.status-menu-choice {
  height: 27px;
  justify-content: flex-start;
  padding: 0 16px;
  border-radius: 13px;
  font-size: 9.6px;
}
@keyframes reader-status-menu-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Reader chrome: move as one soft overlay and never draw separator strips. */
.reading-header,
.reader-homebar {
  background: #151515;
  transition: opacity .42s ease, transform .62s cubic-bezier(.2,.76,.2,1) !important;
}
.reading-header::after,
.reader-homebar::before { content: none !important; }
.reader-controls-hidden .reading-header { transform: translate3d(0, -112%, 0); }
.reader-controls-hidden .reader-homebar { transform: translate3d(0, 112%, 0); }

/* v44 — shared header rhythm and physical reading gestures. */
.space-logo-button,
.reader-main-logo {
  top: 52.93px !important;
  left: 26px !important;
  width: 63.75px;
  height: 18.73px;
}
.space-logo { display: block; width: 100%; height: 100%; }

/* The whole Space status rail is the tap target, not only its tiny label. */
.space-reading-status > .space-status-toggle {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  padding: 3.5px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.space-reading-copy > .space-reading-status,
.space-reading-status {
  /* The older direct-child rule clipped this exact dropdown at 35px high. */
  overflow: visible !important;
}
.space-reading-status > .space-status-menu {
  z-index: 12;
  pointer-events: auto;
}

/* v46 — Bottom Nav (Figma node 141:2832). The original exported vectors are
   intentionally used as images; the app only supplies their interaction. */
.space-bottom-nav {
  height: 128.016px !important;
  overflow: hidden;
  border-radius: 23.817px 23.817px 0 0 !important;
  background: #2b2b2b !important;
}
.space-bottom-nav-items {
  position: absolute;
  right: 0;
  bottom: 29.771px;
  left: 0;
  display: flex !important;
  width: 100%;
  height: auto !important;
  align-items: flex-start;
  justify-content: center;
  gap: 9.924px !important;
  padding: 14.885px 11.909px 0 !important;
}
.space-bottom-nav-items button {
  width: 58.768px;
  min-width: 58.768px;
  flex: 0 0 58.768px;
  gap: 5.359px;
  color: #ffeed7;
  font-family: "Geologica Pilcrow", var(--body);
  font-size: 10.718px;
  font-weight: 300;
  line-height: 14.29px;
}
.space-bottom-nav-items button.is-active { color: #7a5dff; font-weight: 400; }
.space-nav-icon {
  width: 21.435px !important;
  height: 21.435px !important;
  overflow: hidden;
}
.space-nav-icon::before,
.space-nav-icon::after { display: none !important; }
.space-nav-icon > img { position: absolute; display: block; max-width: none; }
.space-nav-icon--home > img:nth-child(1) { top: .893px; left: 1.786px; width: 17.863px; height: 19.649px; }
.space-nav-icon--home > img:nth-child(2) { top: 9.825px; left: 7.145px; width: 7.145px; height: 10.718px; }
.space-nav-icon--explore > img:nth-child(1) { top: 1.786px; left: 1.786px; width: 16.076px; height: 16.076px; }
.space-nav-icon--explore > img:nth-child(2) { top: 13.981px; left: 13.981px; width: 5.671px; height: 5.671px; }
.space-nav-icon--tops > img { top: 0; left: .817px; width: 19.8px; height: 21.429px; }
.space-nav-icon--profile > img:nth-child(1) { top: 12.503px; left: 2.679px; width: 16.076px; height: 7.145px; }
.space-nav-icon--profile > img:nth-child(2) { top: 1.786px; left: 6.25px; width: 8.93px; height: 8.93px; }
.space-home-indicator {
  bottom: 7.94px;
  width: 133.97px;
  height: 4.962px;
  background: #707070;
}
.space-status-toggle > i {
  flex: 1;
  padding-left: 20.5px;
  color: rgb(217 217 217 / 56%);
  font-size: 9.6px;
  font-style: normal;
  font-weight: 300;
}
.space-status-toggle > span {
  display: grid;
  width: 98px;
  height: 28px;
  padding: 0 7px;
  border-radius: 13.29px;
  place-items: center;
  background: var(--space-peach);
  color: var(--space-black);
  font-size: 9.6px;
  font-weight: 300;
  white-space: nowrap;
}

/* The centre reading area batches finger movement into animation frames.
   It preserves direct control while removing the previous jumpy micro-steps. */
.epub-reader .epub-container {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* v49 — Reader redesign from Figma: one clear final layer above the older
   spike experiments. Space deliberately stays untouched. */
.reader-app .reader-main-nav { display: none !important; }
.reader-app .library-screen {
  min-height: max(100dvh, 844px);
  background: #151515;
}
.reader-app .reader-main-header { height: 96px; flex-basis: 96px; }
.reader-app .reader-main-logo {
  top: 52.93px !important;
  left: 26px !important;
  width: 63.75px;
  height: 18.73px;
}
.reader-app .reader-world-switch {
  top: 53px;
  right: 24px;
  width: 130px;
  height: 35px;
  padding: 3px;
  border-radius: 18px;
}
.reader-app .reader-world-switch > * { border-radius: 15px; font-size: 10.3px; }
.reader-app .reader-library { padding: 9px 32.5px 0; }
.reader-app .reader-library h1 {
  margin: 0;
  color: #fbd096;
  font-size: 39.83px;
  font-weight: 900;
  letter-spacing: -.4px;
  line-height: .9;
}
.reader-app .library-filters {
  width: calc(100% + 32.5px);
  height: 37.3px;
  gap: 8.8px;
  margin: 15px 0 0;
  padding: 0 32.5px 1px 0;
  scroll-behavior: smooth;
}
.reader-app .library-filters button {
  height: 37.3px;
  padding: 0 14px;
  border-radius: 18.7px;
  background: #2b2b2b;
  color: #ffeed7;
  font-size: 12.64px;
  font-weight: 300;
}
.reader-app .library-filters button.is-active { background: #fbd096; color: #151515; }
.reader-app .reader-intro {
  width: 244px;
  min-height: 29px;
  margin: 15px 0 25px;
  color: #707070;
  font-size: 14px;
  line-height: 1.05;
}
.reader-app .reader-intro strong { color: #ff6c4b; }
.reader-app #current-book,
.reader-app .library-list {
  width: 324px;
  max-width: 100%;
  margin: 0;
}
.reader-app .library-list { display: grid; gap: 12px; margin-top: 12px; }
.reader-app .shelf-book-card {
  position: relative;
  width: 324px;
  max-width: 100%;
  height: 84px;
  overflow: visible;
  border: 0;
  border-radius: 14.54px;
  background: #2b2b2b;
  color: #ffeed7;
  isolation: isolate;
  transition: margin-bottom .26s ease;
}
.reader-app .shelf-book-card > .book-open { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; }
.reader-app .shelf-book-card > .book-cover,
.reader-app .shelf-book-card > .cover-fallback {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 12px;
  width: 47.44px;
  height: 63.42px;
  border-radius: 3.61px;
  object-fit: cover;
}
.reader-app .shelf-book-copy { position: absolute; z-index: 2; top: 9px; left: 70px; width: 143px; min-width: 0; pointer-events: none; }
.reader-app .shelf-book-copy h2 {
  overflow: hidden;
  margin: 0;
  color: #ffeed7;
  font-family: "Geologica Pilcrow", var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reader-app .shelf-book-copy > p { overflow: hidden; margin: 3px 0 0; color: #707070; font-size: 10px; font-weight: 300; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.reader-app .book-progress-line { display: block; margin-top: 15px; color: #ffeed7; font-size: 8px; font-weight: 200; line-height: 1; }
.reader-app .shelf-book-card .book-status-panel {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 45px;
  width: 93px;
  min-height: 32px;
  padding: 0;
  overflow: visible;
  background: transparent;
}
.reader-app .shelf-book-card .book-status-chip {
  position: static;
  display: grid;
  width: 93px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 16px;
  place-items: center;
  background: #fbd096;
  color: #151515;
  font-family: inherit;
  font-size: 10.2px;
  font-weight: 300;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}
.reader-app .shelf-book-card .book-more {
  position: absolute;
  z-index: 6;
  top: 29px;
  right: 12px;
  display: flex;
  width: 17px;
  height: 5px;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  background: transparent;
}
.reader-app .shelf-book-card .book-more img { display: block; width: 3px; height: 3px; }
.reader-app .shelf-book-card.is-status-open { z-index: 8; margin-bottom: 137px; }
.reader-app .shelf-book-card.is-status-open .book-status-panel { min-height: 161px; }
.reader-app .shelf-book-card .status-menu {
  position: absolute;
  top: 39px;
  right: 0;
  left: 0;
  display: flex;
  width: 155px;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  border-radius: 14px;
  background: #151515;
  box-shadow: 0 14px 30px rgb(0 0 0 / 28%);
  opacity: 0;
  transform: translateY(-5px);
  animation: reader-status-menu-in .2s cubic-bezier(.2,.75,.2,1) .03s forwards;
}
.reader-app .shelf-book-card .status-menu-choice { display: flex; width: 100%; height: 25px; align-items: center; justify-content: flex-start; padding: 0 10px; border: 0; border-radius: 12px; background: #2b2b2b; color: #ffeed7; font-size: 9px; }
.reader-app .shelf-book-card .status-menu-choice img { width: 10px; height: 10px; margin-right: 5px; }
.reader-app .reader-footer { gap: 11px; padding: 28px 24px 31px; }
.reader-app .add-book-button { width: 192px; height: 40px; border-radius: 20px; background: #ff6c4b; color: #151515; font-family: "Geologica Pilcrow", var(--body); font-size: 13.5px; font-weight: 300; }
.reader-app .reader-footer p { color: rgb(217 217 217 / 36%); font-size: 11px; }

/* Reading canvas and its light floating controls. */
.reader-app .reader-shell { --reader-paper: #f1e2c9; --reader-ink: #151515; }
.reader-app .reader-shell[data-theme="light"] { --reader-paper: #fffcf4; --reader-ink: #151515; }
.reader-app .reader-shell[data-theme="black"] { --reader-paper: #121212; --reader-ink: #f4f0e7; }
.reader-app .reader-shell[data-theme="cold"] { --reader-paper: #f3f5ff; --reader-ink: #151515; }
.reader-app .reader-stage,
.reader-app .reader-stage > .epub-reader,
.reader-app .reader-stage > foliate-view,
.reader-app .epub-reader .epub-container { background: var(--reader-paper) !important; }
.reader-app .reading-header {
  z-index: 8;
  top: 69px;
  height: 40px;
  min-height: 40px;
  padding: 0 20px;
  overflow: visible;
  background: transparent !important;
  pointer-events: none;
}
.reader-app .reading-header::after { content: none !important; }
.reader-app .reading-header > * { pointer-events: auto; }
.reader-app .reading-percent,
.reader-app .reading-title,
.reader-app .reading-back {
  position: absolute;
  top: 0;
  height: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 20px;
  background: #fff8e6;
  color: #7e5e31;
  font-family: "Geologica Pilcrow", var(--body);
  font-size: 12.48px;
  font-weight: 300;
  line-height: 40px;
}
.reader-app .reading-percent { left: 20px; width: 50px; padding: 0; }
.reader-app .reading-title { right: 83px; left: 83px; overflow: hidden; margin: 0; padding: 0 14px; color: #7e5e31; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.reader-app .reading-back { right: 20px; width: 51px; padding: 0; background: #ff6c4b; }
.reader-app .reading-back img { width: 17px; height: 17px; }
.reader-app .reader-return-to-page { position: absolute; z-index: 9; top: 126px; left: calc(50% - 25px); display: grid; width: 50px; height: 26px; padding: 0 0 2px; border: 0; border-radius: 16px; place-items: center; background: #ff6c4b; color: #151515; font-size: 20px; line-height: 1; }
.reader-app .reader-return-to-page[hidden] { display: none; }
.reader-app .reader-homebar {
  z-index: 8;
  right: 20px;
  bottom: 34px;
  left: 20px;
  display: block;
  width: auto;
  height: 165px;
  padding: 0;
  overflow: visible;
  background: transparent !important;
}
.reader-app .reader-homebar::before { content: none !important; }
.reader-app .reader-location-card {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 188px;
  min-height: 98px;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 17px 15px;
  border-radius: 16.5px;
  background: #fff8e6;
  box-shadow: 0 8px 20px rgb(70 59 44 / 18%);
  color: #7e5e31;
}
.reader-app .reader-location-card > img { width: 24px; height: 24px; filter: sepia(.58) saturate(.65) hue-rotate(355deg); }
.reader-app .reader-location-card div { min-width: 0; }
.reader-app .reader-location-card strong,
.reader-app .reader-location-card span { display: block; overflow: hidden; color: #7e5e31; font-family: "Geologica Pilcrow", var(--body); text-overflow: ellipsis; white-space: nowrap; }
.reader-app .reader-location-card strong { font-size: 14px; font-weight: 700; line-height: 1.15; }
.reader-app .reader-location-card span { margin-top: 6px; font-size: 9.5px; font-weight: 300; line-height: 1.24; white-space: normal; }
.reader-app .reader-panel-actions { position: absolute; right: 0; bottom: 0; display: flex; gap: 10px; }
.reader-app .reader-panel-actions button { display: grid; width: 126px; height: 40px; padding: 0; border: 0; border-radius: 20px; place-items: center; background: #fff8e6; color: #7e5e31; font-family: "Geologica Pilcrow", var(--body); font-size: 12px; font-weight: 300; }
.reader-app .reader-panel-actions #reader-contents-button { width: 50px; background: #ff6c4b; }
.reader-app .reader-panel-actions img { width: 19px; height: 19px; filter: brightness(0) saturate(100%); }
.reader-app .reader-controls-hidden .reading-header { opacity: 0; transform: translate3d(0, -155%, 0); }
.reader-app .reader-controls-hidden .reader-homebar { height: 165px; opacity: 0; transform: translate3d(0, 135%, 0); }
/* Let the EPUB iframe keep native iOS scrolling. The broad centre-tap handler
   lives inside that iframe; this former overlay is only a legacy fallback and
   must not intercept a reading gesture. */
.reader-app .reader-center-tap-zone { pointer-events: none; }

/* Contents: the heading never scrolls; only chapters do. */
.reader-app .reader-sheet-layer { z-index: 12; display: block; pointer-events: none; }
.reader-app .reader-sheet-layer[hidden] { display: none; }
.reader-app .reader-sheet-backdrop { background: transparent; pointer-events: auto; }
.reader-app .reader-contents-sheet {
  position: absolute;
  top: 127px;
  left: 20px;
  display: block;
  width: 242px;
  height: 415px;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #7e5e31;
}
.reader-app .contents-progress-rail { position: absolute; top: 0; left: 0; width: 40px; height: 100%; border-radius: 22px; background: #fff8e6; }
.reader-app .contents-progress-rail::before { position: absolute; top: 32px; bottom: 32px; left: 19px; width: 2px; border-radius: 2px; content: ""; background: #ff6c4b; }
.reader-app .contents-progress-rail span { position: absolute; top: 50px; left: 14px; width: 12px; height: 12px; border-radius: 50%; background: #ff6c4b; }
.reader-app .contents-card { position: absolute; top: 0; right: 0; display: flex; width: 188px; height: 100%; flex-direction: column; overflow: hidden; padding: 16px; border-radius: 16.5px; background: #fff8e6; box-sizing: border-box; pointer-events: auto; }
.reader-app .contents-card h2 { flex: 0 0 auto; margin: 0 0 12px; color: #7e5e31; font-family: "Geologica Pilcrow", var(--body); font-size: 15px; font-weight: 700; line-height: 1.2; }
.reader-app .contents-list { display: grid; min-height: 0; flex: 1; align-content: start; gap: 6px; overflow-y: auto; padding: 0 3px 3px 0; -webkit-overflow-scrolling: touch; }
.reader-app .contents-list button { width: 100%; min-height: 35px; padding: 8px 9px; border: 0; border-radius: 10px; background: #f1e2c9; color: #7e5e31; font-family: "Geologica Pilcrow", var(--body); font-size: 10px; font-weight: 300; line-height: 1.18; text-align: left; }

/* Settings starts compact. Pull the warm handle up to reveal the two sliders. */
.reader-app .reader-settings-sheet {
  position: absolute;
  right: 20px;
  bottom: 44px;
  left: 20px;
  width: auto;
  height: 178px;
  overflow: hidden;
  padding: 31px 16px 16px;
  border: 0;
  border-radius: 17px;
  background: #fff8e6;
  color: #7e5e31;
  box-sizing: border-box;
  transition: height .32s cubic-bezier(.2,.76,.2,1), bottom .32s cubic-bezier(.2,.76,.2,1);
  pointer-events: auto;
}
.reader-app .reader-settings-sheet.is-expanded { height: 271px; }
.reader-app .reader-settings-sheet .reader-sheet-heading { display: none; }
.reader-app .settings-drag-handle { position: absolute; top: 9px; left: 50%; width: 82px; height: 18px; padding: 0; border: 0; transform: translateX(-50%); background: transparent; touch-action: none; }
.reader-app .settings-drag-handle span { display: block; width: 82px; height: 4px; border-radius: 8px; background: #7e5e31; }
.reader-app .reader-settings-sheet .settings-group { margin: 0 0 12px; }
.reader-app .reader-settings-sheet .settings-group + .settings-group { display: none; }
.reader-app .reader-settings-sheet .settings-label { margin: 0 0 6px; color: #7e5e31; font-size: 11px; font-weight: 700; line-height: 1; }
.reader-app .reader-settings-sheet .theme-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.reader-app .reader-settings-sheet .theme-options button { height: 27px; padding: 0 4px; border: 1px solid #151515; border-radius: 14px; background: #fff8e6; color: #7e5e31; font-family: "Geologica Pilcrow", var(--body); font-size: 9px; font-weight: 300; }
.reader-app .reader-settings-sheet .theme-options [data-reader-theme="warm"] { background: #f1e2c9; }
.reader-app .reader-settings-sheet .theme-options [data-reader-theme="light"] { background: #fffcf4; }
.reader-app .reader-settings-sheet .theme-options [data-reader-theme="black"] { background: #151515; color: #ffeed7; }
.reader-app .reader-settings-sheet .theme-options [data-reader-theme="cold"] { background: #f3f5ff; }
.reader-app .reader-settings-sheet .theme-options button.is-active { border-color: #ff6c4b; box-shadow: inset 0 0 0 1px #ff6c4b; }
.reader-app .reader-settings-sheet .settings-field { position: relative; display: grid; width: 100%; height: 29px; margin: 0; padding: 0; border: 0; }
.reader-app .reader-settings-sheet .settings-field > span:not(.font-size-stepper) { display: none; }
.reader-app .reader-settings-sheet .settings-field select { width: calc(100% - 78px); height: 29px; padding: 0 27px 0 11px; border: 0; border-radius: 14px; appearance: none; background: #2b2b2b; color: #ffeed7; font-family: "Geologica Pilcrow", var(--body); font-size: 10px; font-weight: 300; }
.reader-app .reader-settings-sheet .settings-field::after { position: absolute; top: 10px; left: calc(100% - 94px); width: 6px; height: 6px; border-right: 1px solid #ffeed7; border-bottom: 1px solid #ffeed7; content: ""; transform: rotate(45deg); pointer-events: none; }
.reader-app .font-size-stepper { position: absolute; top: 0; right: 0; display: flex; gap: 4px; }
.reader-app .font-size-stepper button { display: grid; width: 29px; height: 29px; padding: 0; border: 0; border-radius: 8px; place-items: center; background: #2b2b2b; color: #ffeed7; font-size: 19px; font-weight: 300; line-height: 1; }
.reader-app .reader-settings-sheet label[for="reader-font-size"],
.reader-app .reader-settings-sheet .settings-switch-row,
.reader-app .reader-settings-sheet .mode-options,
.reader-app .reader-settings-sheet .reset-settings { display: none; }
.reader-app .reader-settings-sheet label[for="reader-line-height"],
.reader-app .reader-settings-sheet label[for="reader-margin"] { display: none; margin: 11px 0 0; }
.reader-app .reader-settings-sheet.is-expanded label[for="reader-line-height"],
.reader-app .reader-settings-sheet.is-expanded label[for="reader-margin"] { display: grid; grid-template-columns: 1fr auto; gap: 5px; }
.reader-app .reader-settings-sheet .settings-range > span,
.reader-app .reader-settings-sheet .settings-range output { color: #7e5e31; font-family: "Geologica Pilcrow", var(--body); font-size: 10px; font-weight: 700; }
.reader-app .reader-settings-sheet .settings-range output { font-weight: 300; }
.reader-app .reader-settings-sheet .settings-range input { width: 100%; height: 16px; grid-column: 1 / -1; accent-color: #ff6c4b; }
.reader-app .reader-settings-sheet .settings-range input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: #2b2b2b; }
.reader-app .reader-settings-sheet .settings-range input::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; appearance: none; background: #ff6c4b; }

@media (max-width: 359px) {
  .reader-app .reader-library { padding-right: 24px; padding-left: 24px; }
  .reader-app .shelf-book-card { width: 100%; }
  .reader-app .reader-world-switch { width: 122px; right: 18px; }
}

/* The earlier spike scoped these panels with IDs. Repeat that scope here so
   this v49 geometry always wins without depending on selector order. */
#contents-sheet .reader-contents-sheet {
  position: absolute;
  top: 127px;
  left: 20px;
  display: block;
  width: 242px;
  height: 415px;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
#contents-sheet .reader-contents-sheet .reader-sheet-heading { display: block; flex: 0 0 auto; margin: 0 0 12px; padding: 0; background: transparent; }
#contents-sheet .reader-contents-sheet .reader-sheet-kicker,
#contents-sheet .reader-contents-sheet .reader-sheet-close { display: none; }
#contents-sheet .contents-card h2 { margin: 0 0 12px; color: #7e5e31; font-family: "Geologica Pilcrow", var(--body); font-size: 15px; font-weight: 700; line-height: 1.2; }
#settings-sheet .reader-settings-sheet {
  position: absolute;
  right: 20px;
  bottom: 44px;
  left: 20px;
  width: auto;
  height: 178px;
  max-height: none;
  padding: 31px 16px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  background: #fff8e6;
  color: #7e5e31;
  box-sizing: border-box;
}
#settings-sheet .reader-settings-sheet.is-expanded { height: 271px; }
#settings-sheet .reader-settings-sheet .reader-sheet-heading { display: none; }

/* v52 — the old spike still owns the overlay coordinates with !important.
   Reassert the real iPhone geometry here, including the safe areas. */
.reader-app .reading-header {
  top: calc(env(safe-area-inset-top) + 16px) !important;
  right: 0 !important;
  left: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 20px !important;
}
.reader-app .reader-homebar {
  right: 20px !important;
  bottom: calc(env(safe-area-inset-bottom) + 20px) !important;
  left: 20px !important;
  width: auto !important;
  height: 165px !important;
  min-height: 0 !important;
  padding: 0 !important;
}
.reader-app .reader-controls-hidden .reading-header {
  height: 40px !important;
  min-height: 40px !important;
  transform: translate3d(0, -155%, 0) !important;
}
.reader-app .reader-controls-hidden .reader-homebar {
  height: 165px !important;
  min-height: 0 !important;
  transform: translate3d(0, 135%, 0) !important;
}
.reader-app .reader-return-to-page {
  top: calc(env(safe-area-inset-top) + 72px) !important;
}

/* The compact card has two independent controls on the right. Reserve that
   space so a long book title can never sit underneath the status pill. */
.reader-app .shelf-book-copy {
  right: 142px;
  width: auto;
}

/* v112 — account shell. This is deliberately isolated from Reader: account
   state belongs to Space, while EPUBs and their progress remain local. */
.space-auth {
  position: relative;
  display: flex;
  min-height: max(100dvh, 844px);
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 48px) 32px calc(env(safe-area-inset-bottom) + 30px);
  overflow: hidden;
  background: #151515;
  color: #fbd096;
  box-sizing: border-box;
  font-family: "Geologica Pilcrow", var(--body);
}
.space-auth-close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 24px);
  right: 26px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #ff6c4b;
  border-radius: 50%;
  place-items: center;
  background: transparent;
  color: #ff6c4b;
  font: 300 26px/1 var(--body);
}
.space-auth-logo { width: 82px; height: auto; margin-top: 7px; }
.space-auth-copy { margin-top: 150px; }
.space-auth-copy h1 {
  margin: 0;
  color: #fbd096;
  font-size: clamp(30px, 8vw, 38px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .94;
}
.space-auth-copy p { max-width: 245px; margin: 20px 0 0; color: #8e867c; font-size: 14px; font-weight: 300; line-height: 1.45; }
.space-auth-actions { margin-top: auto; }
.space-google-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  background: #ff6c4b;
  color: #151515;
  font: 600 15px/1 "Geologica Pilcrow", var(--body);
  transition: transform .16s ease, filter .16s ease;
}
.space-google-button:active { transform: scale(.975); filter: brightness(.94); }
.space-google-button > span { display: grid; width: 21px; height: 21px; border-radius: 50%; place-items: center; background: #fff; color: #4285f4; font-family: Arial, sans-serif; font-size: 13px; font-weight: 700; }
.space-auth-actions > p { margin: 12px 0 0; color: #67615a; font-size: 11px; line-height: 1.4; text-align: center; }
.space-auth-notice { display: block; margin-top: 12px; color: #fbd096; font-size: 12px; line-height: 1.35; text-align: center; }
.space-auth-footnote { margin: 28px 0 0; color: #605b55; font-size: 11px; line-height: 1.4; text-align: center; }

.space-view--profile { padding: 98px 22px 142px; }
.space-profile-card { padding: 0 0 18px; overflow: hidden; border-radius: 34px; background: #7a5dff; color: #151515; box-shadow: 0 15px 35px rgb(0 0 0 / .2); }
.space-profile-card-top { display: flex; min-height: 123px; align-items: center; gap: 16px; padding: 22px; background: #fbd096; }
.space-profile-avatar { display: grid; width: 67px; height: 67px; flex: 0 0 67px; overflow: hidden; border: 2px solid #151515; border-radius: 50%; place-items: center; background: #151515; color: #fbd096; font-size: 24px; font-weight: 700; }
.space-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.space-profile-card-top p { margin: 0 0 3px; color: #7e5e31; font-size: 11px; }
.space-profile-card-top h1 { margin: 0; color: #151515; font-size: 25px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.space-profile-card-top span { display: block; margin-top: 6px; color: #5d4b32; font-size: 11px; line-height: 1.25; }
.space-profile-stat { display: flex; min-height: 72px; flex-direction: column; justify-content: center; padding: 12px 15px; border-radius: 17px; background: #fbd096; color: #151515; }
.space-profile-stat--main { min-height: 88px; margin: 17px 18px 10px; background: #b8f538; }
.space-profile-stat strong { font-size: 29px; font-weight: 800; letter-spacing: -.06em; line-height: .9; }
.space-profile-stat span { margin-top: 6px; font-size: 11px; font-weight: 500; }
.space-profile-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 18px; }
.space-profile-stat-row .space-profile-stat strong { font-size: 21px; }
.space-profile-signout { display: block; margin: 17px auto 0; padding: 0; border: 0; background: transparent; color: #fbd096; font: 500 12px/1 var(--body); text-decoration: underline; text-underline-offset: 3px; }
.space-profile-tabs { display: flex; gap: 7px; margin: 18px -2px 0; overflow-x: auto; scrollbar-width: none; }
.space-profile-tabs::-webkit-scrollbar { display: none; }
.space-profile-tabs button { min-width: max-content; padding: 9px 12px; border: 0; border-radius: 13px; background: #292929; color: #fbd096; font: 500 11px/1 var(--body); }
.space-profile-tabs button.is-active { background: #7a5dff; color: #151515; }
.space-profile-book-status-tabs { display: flex; gap: 7px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.space-profile-book-status-tabs::-webkit-scrollbar { display: none; }
.space-profile-book-status-tabs button { flex: 0 0 auto; min-width: max-content; padding: 9px 12px; border: 0; border-radius: 13px; background: #292929; color: #fbd096; font: 500 11px/1 var(--body); }
.space-profile-book-status-tabs button.is-active { background: #c8f542; color: #151515; }
.space-profile-empty { margin-top: 28px; padding: 27px 18px; border: 1px solid rgb(251 208 150 / .18); border-radius: 21px; color: #fbd096; text-align: center; }
.space-profile-empty strong { display: block; font-size: 16px; line-height: 1.15; }
.space-profile-empty p { margin: 11px 0 0; color: #918a82; font-size: 12px; line-height: 1.45; }
.space-profile-section-kicker { margin: 24px 0 10px; color: #918a82; font: 700 10px/1 var(--body); letter-spacing: .12em; }
.space-profile-activity { display: grid; gap: 9px; }
.space-profile-activity-day { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 62px; padding: 13px 15px; border: 1px solid rgb(251 208 150 / .12); border-radius: 16px; background: #242424; color: #fbd096; }
.space-profile-activity-day strong, .space-profile-activity-day span { display: block; }
.space-profile-activity-day strong { font-size: 14px; line-height: 1.1; }
.space-profile-activity-day span { margin-top: 5px; color: #918a82; font-size: 10px; }
.space-profile-activity-day b { flex: 0 0 auto; color: #c8f542; font-size: 13px; }
.space-profile-statistics { margin-top: 3px; }
.space-profile-statistics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.space-profile-statistics-card { display: flex; min-height: 112px; flex-direction: column; justify-content: flex-end; padding: 14px; border-radius: 17px; background: #292929; color: #fbd096; }
.space-profile-statistics-card--wide { grid-column: 1 / -1; min-height: 92px; background: #b8f538; color: #151515; }
.space-profile-statistics-card strong { font-size: 26px; font-weight: 800; letter-spacing: -.05em; line-height: .95; }
.space-profile-statistics-card span { margin-top: 7px; font-size: 10px; line-height: 1.25; }
.space-profile-statistics-note { margin: 14px 3px 0; color: #918a82; font-size: 11px; line-height: 1.35; }
.space-profile-library { display: grid; gap: 10px; margin-top: 22px; }
.space-profile-book {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 80px;
  padding: 9px;
  border: 0;
  border-radius: 17px;
  background: #292929;
  color: #ffeed7;
  text-align: left;
}
.space-profile-book .space-cover { width: 54px; height: 70px; border-radius: 9px; }
.space-profile-book > span { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.space-profile-book strong,
.space-profile-book em,
.space-profile-book small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-profile-book strong { font-size: 14px; font-weight: 700; }
.space-profile-book em { margin-top: 3px; color: #918a82; font-size: 11px; font-style: normal; }
.space-profile-book small { margin-top: 7px; color: #b8f538; font-size: 10px; font-weight: 600; }

/* v113 — Space bottom navigation becomes one compact floating island from the
   shared Figma component (390px artboard: 328 × 61, 55px radius). */
.space-bottom-nav {
  right: auto !important;
  bottom: calc(env(safe-area-inset-bottom) + 20px) !important;
  left: 50% !important;
  display: grid !important;
  width: min(328px, calc(100% - 40px)) !important;
  height: 61px !important;
  overflow: hidden !important;
  border-radius: 55px !important;
  transform: translateX(-50%);
  background: #2b2b2b !important;
  box-shadow: 0 12px 28px rgb(0 0 0 / .22);
}
.space-bottom-nav-items {
  position: static !important;
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 35px !important;
  box-sizing: border-box;
}
.space-bottom-nav-items button {
  width: 58.768px !important;
  min-width: 58.768px !important;
  flex: 0 1 58.768px !important;
  gap: 5.359px !important;
  color: #ffeed7 !important;
  font-size: 10.718px !important;
  font-weight: 300 !important;
  line-height: 14.29px !important;
}
.space-bottom-nav-items button.is-active { color: #7a5dff !important; font-weight: 400 !important; }
.space-home-indicator { display: none !important; }

/* v114 — live catalogue entities. These panels intentionally stay a little
   more neutral than the Reader: their job is to prove real catalogue →
   profile behaviour before Tomas gives them their final art direction. */
.space-view--book,
.space-view--author {
  min-height: max(100dvh, 844px);
  padding-bottom: 104px;
  overflow: visible;
}
.space-entity { min-height: 100%; }
.space-entity-loading,
.space-entity-empty {
  display: grid;
  min-height: 600px;
  align-content: center;
  justify-items: center;
  gap: 13px;
  padding: 100px 34px 160px;
  color: #ffeed7;
  text-align: center;
}
.space-entity-loading > span {
  width: 24px;
  height: 24px;
  border: 3px solid rgb(251 208 150 / .22);
  border-top-color: #fbd096;
  border-radius: 50%;
  animation: entity-spin .8s linear infinite;
}
.space-entity-loading p,
.space-entity-empty p { margin: 0; color: #918a82; font-size: 13px; line-height: 1.4; }
.space-entity-empty strong { font-size: 19px; }
.space-entity-empty button {
  margin-top: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: #fbd096;
  color: #151515;
  font: 600 13px/1 "Geologica Pilcrow", var(--body);
}
@keyframes entity-spin { to { transform: rotate(1turn); } }

.space-book-hero,
.space-author-hero {
  position: relative;
  height: 236px;
  overflow: hidden;
  isolation: isolate;
}
.space-book-hero { background: #2b2b2b; }
.space-book-hero::before {
  position: absolute;
  z-index: -2;
  inset: -30px;
  content: "";
  background: var(--entity-cover, linear-gradient(135deg, #433149, #171717)) center / cover;
  filter: blur(22px) brightness(.42);
  transform: scale(1.13);
}
.space-book-hero-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgb(21 21 21 / .45), #151515 95%); }
.space-book-hero .space-cover {
  position: absolute;
  top: 63px;
  left: 50%;
  width: 130px;
  height: 190px;
  transform: translateX(-50%);
  border: 1px solid #252525;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgb(0 0 0 / .7);
}
.space-book-hero .space-cover .space-cover-art { width: 100%; height: 100%; object-fit: cover; }
.space-entity-back {
  position: absolute;
  z-index: 2;
  top: 101px;
  left: 20px;
  padding: 7px 12px;
  border: 0;
  border-radius: 18px;
  background: rgb(21 21 21 / .62);
  color: #fbd096;
  font: 500 12px/1 "Geologica Pilcrow", var(--body);
  backdrop-filter: blur(10px);
}
.space-entity-main { padding: 70px 24px 126px; }
.space-entity-kicker { margin: 0 0 7px; color: #7a5dff; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.space-entity-main > h1 { margin: 0; color: #fbd096; font-size: 36px; font-weight: 900; letter-spacing: -.045em; line-height: 1.02; }
.space-entity-author {
  display: inline-block;
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffeed7;
  font: 500 17px/1.25 "Geologica Pilcrow", var(--body);
  text-decoration: underline;
  text-decoration-color: #7a5dff;
  text-underline-offset: 5px;
}
.space-entity-meta { margin: 10px 0 0; color: #85817b; font-size: 13px; }
.space-save-work {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  border: 0;
  border-radius: 24px;
  background: #b8f538;
  color: #151515;
  font: 700 15px/1 "Geologica Pilcrow", var(--body);
  transition: transform .16s ease, background .16s ease;
}
.space-save-work:active { transform: scale(.98); }
.space-save-work.is-saved,
.space-save-work:disabled { background: #2b2b2b; color: #fbd096; }
.space-entity-tabs { display: flex; gap: 23px; margin-top: 30px; border-bottom: 1px solid #252525; }
.space-entity-tabs button { padding: 0 0 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #707070; font: 500 14px/1 "Geologica Pilcrow", var(--body); }
.space-entity-tabs button.is-active { border-bottom-color: #7a5dff; color: #7a5dff; }
.space-entity-tabs button:disabled { opacity: 1; }
.space-entity-description { margin: 27px 0 0; color: #fbd096; font-size: 16px; font-style: normal; line-height: 1.52; }
.space-entity-section { margin-top: 30px; }
.space-entity-section h2 { margin: 0 0 12px; color: #fbd096; font-size: 15px; font-weight: 700; }
.space-entity-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.space-entity-tags span { padding: 8px 13px; border: 1px solid #252525; border-radius: 999px; background: #1d1d1d; color: #ffeed7; font-size: 12px; }
.space-entity-note { margin-top: 32px; padding: 17px; border: 1px solid rgb(122 93 255 / .55); border-radius: 17px; background: #1d1d1d; }
.space-entity-note strong { color: #7a5dff; font-size: 13px; }
.space-entity-note p { margin: 6px 0 0; color: #9a948d; font-size: 12px; line-height: 1.45; }

.space-author-hero { height: 222px; background: #fbd096; }
.space-author-hero .space-entity-back { background: rgb(21 21 21 / .1); color: #151515; }
.space-author-portrait {
  position: absolute;
  right: 30px;
  bottom: -31px;
  display: grid;
  width: 138px;
  height: 180px;
  overflow: hidden;
  border: 3px solid #151515;
  border-radius: 18px;
  place-items: center;
  background: #2b2b2b;
  color: #fbd096;
  font-size: 48px;
  font-weight: 800;
}
.space-author-portrait img { width: 100%; height: 100%; object-fit: cover; }
.space-author-entity .space-entity-main { padding-top: 45px; }
.space-entity-empty-copy { margin: 22px 0 0; color: #918a82; font-size: 14px; line-height: 1.45; }

/* v118 — Space catalogue is now a real browse surface: the document scrolls,
   while the navigation island remains where a person expects it. */
.space-app {
  height: 844px !important;
  min-height: 844px !important;
  overflow: hidden;
}
.space-view {
  height: 844px;
  min-height: 844px !important;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.space-view--tops,
.space-view--book,
.space-view--author { min-height: 844px !important; }
.space-bottom-nav { position: absolute !important; z-index: 30 !important; }
.space-catalog-empty { margin: 0; color: #918a82; font-size: 13px; line-height: 1.4; }

/* A ranking row has two distinct targets: the book opens; Add saves it. */
.space-ranking-card { position: relative; display: block; overflow: visible; }
.space-ranking-open { position: relative; display: grid; grid-template-columns: 47.8px minmax(0, 1fr); column-gap: 11px; width: 100%; height: 100%; padding: 10px 13px; border: 0; border-radius: inherit; background: transparent; color: inherit; text-align: left; }
.space-ranking-open > .space-cover { width: 47.8px; height: 64px; }
.space-ranking-open > span { min-width: 0; padding-top: 4px; }
.space-ranking-open strong,
.space-ranking-open em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-ranking-open strong { font-size: 13px; font-weight: 700; }
.space-ranking-open em { margin-top: 2px; color: var(--space-grey); font-size: 10px; font-style: normal; font-weight: 300; }
.space-ranking-open > i { position: absolute; top: 7px; right: 18px; color: var(--space-grey); font-size: 10px; font-style: normal; letter-spacing: 2px; }
.space-catalog-add,
.space-catalog-status { position: absolute; z-index: 2; right: 13px; bottom: 12px; display: grid; width: 86px; height: 24px; padding: 0 7px; overflow: hidden; border: 0; border-radius: 12px; place-items: center; background: var(--space-lime); color: var(--space-black); font-family: inherit; font-size: 9px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.space-catalog-status { background: var(--space-black); color: var(--space-cream); }
.space-ranking-card.is-status-open { z-index: 12; }
.space-catalog-status-menu { position: absolute; z-index: 20; right: 8px; bottom: -194px; display: grid; width: 165px; height: 190px; gap: 3.916px; padding: 7.832px; overflow: hidden; border: .979px solid #252525; border-radius: 15.663px; background: #353535; box-shadow: 0 11.747px 23.495px rgb(0 0 0 / .63); animation: space-status-menu-in .2s cubic-bezier(.2,.75,.2,1) both; }
.space-catalog-status-menu button { display: flex; width: 100%; min-width: 0; height: 31px; align-items: center; gap: 7.832px; justify-content: flex-start; padding: 7.832px 9.789px; border: 0; border-radius: 7.832px; background: transparent; color: #b7b7b7; font-family: "Geologica Pilcrow", var(--body); font-size: 11.747px; font-weight: 300; text-align: left; }
.space-catalog-status-menu button.is-active { background: #151515; color: #7a5dff; font-size: 13.705px; }
.space-catalog-status-menu img { width: 15.663px; height: 15.663px; flex: 0 0 auto; }
.space-catalog-status-menu span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes space-status-menu-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.space-book-status-control { position: relative; z-index: 2; margin-top: 24px; }
.space-book-status-control .space-save-work { margin-top: 0; }
.space-book-status-control.is-status-open { z-index: 15; }
.space-book-status-control .space-catalog-status-menu { right: 0; bottom: auto; top: 54px; }

/* Functional first pass: personal rating and a private note on a saved work. */
.space-personal-book { display: grid; gap: 14px; margin-top: 30px; padding: 17px; border: 1px solid rgb(122 93 255 / .55); border-radius: 17px; background: #1d1d1d; }
.space-personal-book-rating { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.space-personal-book h2 { margin: 0; color: #fbd096; font-size: 15px; font-weight: 700; }
.space-personal-book-rating p { margin: 4px 0 0; color: #9a948d; font-size: 12px; }
.space-personal-stars { display: flex; gap: 2px; }
.space-personal-stars button { width: 25px; height: 30px; padding: 0; border: 0; background: transparent; color: #62605e; font-size: 20px; line-height: 1; }
.space-personal-stars button.is-active { color: #c8f542; }
.space-personal-note-field { display: grid; gap: 7px; color: #fbd096; font-size: 13px; font-weight: 600; }
.space-personal-note-field textarea { width: 100%; min-height: 76px; resize: vertical; padding: 11px; border: 1px solid #343434; border-radius: 11px; outline: none; background: #151515; color: #ffeed7; font: 300 13px/1.4 "Geologica Pilcrow", system-ui, sans-serif; }
.space-personal-note-field textarea:focus { border-color: #7a5dff; }
.space-personal-save { justify-self: start; min-height: 34px; padding: 0 15px; border: 0; border-radius: 17px; background: #7a5dff; color: #151515; font: 600 12px/1 "Geologica Pilcrow", system-ui, sans-serif; }
.space-personal-save:disabled { opacity: .6; }

/* v119 — Home uses the compact editorial card from Figma 353:1057. The card
   opens a work; its pill remains a separate target for saving/status. */
.space-home-catalog-card {
  position: absolute;
  z-index: 1;
  top: 301.75px;
  left: 28.5px;
  display: block;
  width: 324px;
  height: 158.88px;
  box-sizing: border-box;
  overflow: visible;
  border-radius: 15px;
  background: #2b2b2b;
  color: #ffeed7;
}
.space-home-catalog-open {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: 94.831px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 13px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  text-align: left;
}
.space-home-catalog-open .space-cover { width: 94.831px; height: 134.88px; overflow: hidden; border-radius: 8.246px; }
.space-home-catalog-info { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.space-home-catalog-info > strong,
.space-home-catalog-info > em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-home-catalog-info > strong { color: #ffeed7; font-size: 17.5px; font-weight: 600; line-height: 1.15; }
.space-home-catalog-info > em { color: #707070; font-size: 13.75px; font-style: normal; font-weight: 400; line-height: 1.2; }
.space-home-catalog-spacer { flex: 1 1 auto; }
.space-home-catalog-info small { display: flex; align-items: center; gap: 12px; color: #707070; font-size: 10px; }
.space-home-catalog-info small b { color: #ffeed7; font-weight: 600; }
.space-home-catalog-info small i { color: #707070; font-style: normal; font-weight: 500; }
.space-home-catalog-action {
  position: absolute;
  z-index: 2;
  right: 13px;
  bottom: 17px;
  min-width: 84.67px;
  height: 27px;
  padding: 5px 12px;
  border: 0;
  border-radius: 100px;
  background: #c8f542;
  color: #2b2b2b;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.space-home-catalog-action.is-saved { background: #151515; color: #ffeed7; }
.space-home-catalog-card.is-status-open { z-index: 12; }
.space-home-catalog-card .space-catalog-status-menu { right: 0; bottom: -194px; }

/* Keep Space to the 390px mobile artboard rhythm even while its catalogue
   content is allowed to scroll beneath the fixed island. */
.space-bottom-nav {
  top: auto !important;
  right: auto !important;
  bottom: max(40px, env(safe-area-inset-bottom)) !important;
  left: 50% !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
}
.space-author-works { display: grid; gap: 10px; }
.space-author-works > button {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 0;
  border-radius: 15px;
  background: #2b2b2b;
  color: #ffeed7;
  text-align: left;
}
.space-author-works .space-cover { width: 45px; height: 64px; border-radius: 6px; }
.space-author-works .space-cover .space-cover-art { width: 100%; height: 100%; object-fit: cover; }
.space-author-works span { min-width: 0; }
.space-author-works strong,
.space-author-works em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-author-works strong { font-size: 14px; }
.space-author-works em { margin-top: 5px; color: #85817b; font-size: 12px; font-style: normal; }
