:root {
  --pink: #ffd8e9;
  --pink-deep: #f7a8c9;
  --pink-line: #ffe6f0;
  --white: #ffffff;
  --ink: #2b1f27;
  --ink-soft: #6f6069;
  --cream: #fff9fb;
  --accent: #e0578e;
  --shadow: 0 20px 50px -20px rgba(220, 120, 160, 0.35);
  --card-shadow: 0 12px 30px -18px rgba(220, 120, 160, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  font-family: 'Outfit', sans-serif;
  background-image: url(/media/pinkcheck.png);
  background-size: 40px;
  color: var(--ink);
  min-height: 100vh;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

button {
  font-family: inherit;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 88px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0 16px;
  gap: 28px;
  border-right: 1px solid var(--pink-line);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  font-size: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand svg {
  width: 24px;
  height: 24px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 8px;
}

.side-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #c98aa8;
  text-decoration: none;
  transition: .2s;
  border: none;
  background: none;
  cursor: pointer;
}

.side-link svg {
  width: 20px;
  height: 20px;
}

.side-link:hover {
  background: var(--pink-line);
  color: var(--accent);
}

.side-link.active {
  background: var(--pink);
  color: var(--accent);
}

.side-sep {
  width: 28px;
  height: 1px;
  background: var(--pink-line);
  margin: 2px 0;
}

/* Main */
.main {
  flex: 1;
  padding: 36px 48px 60px;
  max-width: 1400px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 24px;
}

.search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.search>svg {
  position: absolute;
  left: 18px;
  top: 14px;
  width: 18px;
  height: 18px;
  color: #c98aa8;
  pointer-events: none;
}

.search input {
  width: 100%;
  border: 1px solid var(--pink-line);
  outline: none;
  background: var(--white);
  font-family: 'Outfit';
  font-size: 14px;
  color: var(--ink);
  padding: 12px 18px 12px 46px;
  border-radius: 999px;
  transition: box-shadow .2s, border-color .2s;
}

.search input:focus {
  border-color: var(--pink-deep);
  box-shadow: 0 0 0 4px var(--pink-line);
}

.search input::placeholder {
  color: #c3a9b6;
}

.search-results {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: .18s;
  z-index: 50;
  max-height: 340px;
  overflow-y: auto;
}

.search-results.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.search-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
}

.search-item:hover {
  background: var(--pink-line);
}

.search-item img {
  width: 32px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--pink);
}

.search-item div {
  display: flex;
  flex-direction: column;
}

.search-item strong {
  font-size: 13px;
}

.search-item span {
  font-size: 11.5px;
  color: #ff9ec6;
}

.search-empty {
  padding: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--pink-line);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #c98aa8;
  transition: .2s;
}

.icon-btn:hover {
  background: var(--pink-line);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}

.profile img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--pink-line);
}

/* View transitions */
.view {
  transition: opacity .18s ease, transform .28s ease;
  opacity: 1;
  transform: translateY(0);
}

.view.fade-out {
  opacity: 0;
  transform: translateY(6px);
}

.view.fade-in {
  animation: viewIn .35s ease;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  background: var(--white);
  border-radius: 32px;
  padding: 36px 44px;
  box-shadow: var(--shadow);
  margin-bottom: 36px;
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
}

.hero-slide-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: center;
  width: 100%;
}

@keyframes heroCopyInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroCopyOutDown {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(14px); }
}

.hero-copy.hero-slide-in {
  animation: heroCopyInUp .42s cubic-bezier(.22,.8,.32,1) forwards;
}

.hero-copy.hero-slide-out {
  animation: heroCopyOutDown .16s ease forwards;
}

/* flower grows up from inside the .hero-visual::before gradient, instead of
   just fading/translating in over the top of it */
@keyframes heroFlowerGrowIn {
  from {
    clip-path: inset(58% 0 0 0);
    transform: translateY(34px);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  to {
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes heroFlowerGrowOut {
  from {
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
    opacity: 1;
  }
  to {
    clip-path: inset(58% 0 0 0);
    transform: translateY(20px);
    opacity: 0;
  }
}

.hero-flower.hero-slide-in {
  animation: heroFlowerGrowIn .52s cubic-bezier(.22,.8,.32,1) forwards;
}

.hero-flower.hero-slide-out {
  animation: heroFlowerGrowOut .16s ease forwards;
}

.hero-visual {
  position: relative;
  min-height: 360px;
  margin: -25px -30px; 
  border-radius: 28px 32px 32px 28px; 
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  z-index: 1; 
}

.hero-visual::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 80px; 
  background: linear-gradient(to top, var(--pink) 0%, #ffedf3 100%);
  border-radius: inherit; 
  z-index: -1; 
}

.hero-flower {
  position: absolute;
  bottom: 0;
  right: 0;
  top: -70px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  border-bottom-right-radius: 32px; 
}

.flower-img {
  position: relative;
  width: 100%;
  max-width: 700px;
  object-fit: contain;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 700;
  color: rgb(255, 158, 198);
  margin-bottom: 10px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 460px;
}

.hero-copy h1 {
  font-size: 40px;
  line-height: 1.18;
  margin-bottom: 14px;
  font-weight: 600;
}

.hero-copy h1 br.hero-br-mobile {
  display: none;
}

.hero-copy h1 span {
  color: #ff9ec6;
  font-weight: 700;
}

.hero-sub {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 22px;
}

.hero-sub em {
  font-style: italic;
  color: var(--ink);
}

.btn-primary {
  background: #ff9ec6;
  color: var(--white);
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: .2s;
  text-transform: lowercase;
}

.btn-primary:hover {
  background: #fd8ebd;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-chip {
  margin-top: 16px;
  background: var(--pink-line);
  color: var(--accent);
  border: none;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: .2s;
}

.btn-chip:hover {
  background: var(--pink-deep);
  color: var(--white);
}

.hero-scroll-dots {
  position: absolute;
  left: 30px;
  top: 55%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.hero-scroll-dots .hero-dot {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffe0ec;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px -6px rgba(224, 87, 142, 0.35);
  transition: background .2s, color .2s, transform .2s;
}

.hero-scroll-dots .hero-dot:hover {
  transform: translateY(-1px);
}

.hero-scroll-dots .hero-dot.active {
  color: var(--white);
  background: #ff9ec6;
}

.hero-badge {
  position: absolute;
  left: -130px;
  bottom: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: 20px;
  padding: 15px; 
  box-shadow: var(--card-shadow);
  max-width: 380px;
}

.hero-badge-img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--pink-line);
}

.hero-badge-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge-text h4 {
  font-size: 13.5px;
  margin-bottom: 4px;
}

.hero-badge-text p {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.progress-label {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.progress-label span {
  color: var(--ink);
  font-weight: 700;
}

.progress-track {
  height: 6px;
  background: var(--pink-line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink-deep), var(--accent));
  border-radius: 999px;
  transition: width .5s ease;
}

#mobile-fab-nav {
  display: none;
}

#mobile-fab-toggle {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background-color: #ffd8e9;
  color: #6b7280;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.45), 0 8px 10px -6px rgba(236, 72, 153, 0.35);
  transition: transform 0.15s ease, background-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mobile-fab-toggle:hover {
  background-color: #ffbcd9;
}

#mobile-fab-toggle:active {
  transform: scale(0.94);
}

#mobile-fab-toggle.active {
  background-color: #ff9ec6;
  color: #fff;
}

#mobile-fab-menu-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 260px;
  max-height: 60vh;
  overflow-y: auto;
  background-color: #ffffff;
  border: 1px solid #fbcfe8;
  border-radius: 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.06);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 6px;
}

#mobile-fab-menu-panel[hidden] {
  display: none;
}

.mobile-fab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 12px 4px;
  border-radius: 0.85rem;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}

.mobile-fab-item:hover,
.mobile-fab-item:active {
  background-color: #fdf2f8;
  color: #ec4899;
}

.mobile-fab-item.active {
  background-color: #fdf2f8;
  color: #ec4899;
}

.mobile-fab-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.mobile-fab-label {
  font-size: 11.5px;
  font-weight: 500;
}

.hero-quote {
  font-family: 'Outfit', sans-serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 6px;
}

.quote-attr {
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* Grid */
.grid-2col {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 28px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head h3 {
  font-size: 19px;
}

.dots {
  background: none;
  border: none;
  color: #c98aa8;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.dots:hover {
  color: var(--accent);
}

.week-nav {
  display: flex;
  gap: 8px;
}

.week-nav button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--pink-line);
  background: var(--white);
  color: #c98aa8;
  cursor: pointer;
}

.week-nav button:hover {
  background: var(--pink-line);
}

/* Book cards */
.book-row,
.book-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.book-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 190px);
  gap: 18px;
}

.book-row-4 .book-card {
  width: auto;
}

.book-grid {
  margin-top: 8px;
}

.book-card {
  background: var(--white);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: .25s;
  width: 190px;
  flex-shrink: 0;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -16px rgba(220, 120, 160, 0.5);
}

.cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--pink-deep), var(--pink));
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-fallback .cover-img {
  opacity: 0;
}

.save-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: .2s;
}

.save-toggle:hover {
  background: var(--white);
  transform: scale(1.08);
}

.save-toggle svg {
  width: 15px;
  height: 15px;
}

.save-toggle.saved {
  color: var(--accent);
}

.book-card h4 {
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Outfit';
  line-height: 1.3;
  margin-bottom: 4px;
}

.book-card p {
  font-size: 12px;
  color: var(--ink-soft);
}

/* Week strip */
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: var(--white);
  padding: 14px;
  border-radius: 18px;
  box-shadow: var(--card-shadow);
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  border-radius: 12px;
  cursor: pointer;
  transition: .2s;
}

.day:hover {
  background: var(--pink-line);
}

.dname {
  font-size: 11px;
  color: var(--ink-soft);
}

.dnum {
  font-size: 14px;
  font-weight: 700;
}

.day.active {
  background: var(--pink);
}

.day.active .dnum {
  color: var(--accent);
}

/* Friends */
.updates {
  background: var(--white);
  border-radius: 18px;
  padding: 8px;
  box-shadow: var(--card-shadow);
}

.friend {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--pink-line);
}

.friend:last-child {
  border-bottom: none;
}

.friend img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.friend-name-row {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.friend-name-row .time-sep {
  font-size: 11px;
  color: var(--ink-soft);
}

.friend-name-row strong {
  font-size: 13.5px;
}

.friend-name-row .time {
  font-size: 11px;
  color: var(--ink-soft);
}

.friend-body p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 6px;
}

.chapter-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--pink-line);
  padding: 5px 10px;
  border-radius: 999px;
}

.chapter-tag[role="button"] {
  cursor: pointer;
  margin-right: 6px;
  margin-top: 4px;
  user-select: none;
  transition: .2s;
  border: none;
}

.chapter-tag[role="button"]:hover {
  background: var(--pink-deep);
  color: var(--white);
}

.chapter-tag.update-delete:hover {
  background: #e0578e;
  color: var(--white);
}

.update-edit-input {
  width: 100%;
  resize: vertical;
  min-height: 56px;
  font-family: 'Outfit';
  font-size: 13px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--pink-line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  outline: none;
}

.update-edit-input:focus {
  border-color: var(--pink-deep);
  box-shadow: 0 0 0 4px var(--pink-line);
}

/* Page headers (library/saved/media sections) */
.page-head {
  margin-bottom: 24px;
}

.page-head h2 {
  font-size: 30px;
  margin-bottom: 6px;
}

.page-sub {
  color: var(--ink-soft);
  font-size: 14px;
}

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-chip {
  background: var(--white);
  border: 1px solid var(--pink-line);
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}

.filter-chip:hover {
  border-color: var(--pink-deep);
}

.filter-chip.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* Library shelf view */
.library-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.lib-tabs {
  display: flex;
  gap: 4px;
  background: var(--white);
  padding: 5px;
  border-radius: 999px;
  box-shadow: var(--card-shadow);
}

.lib-tab {
  border: none;
  background: none;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: .2s;
}

.lib-tab:hover {
  color: var(--accent);
}

.lib-tab.active {
  background: var(--pink);
  color: var(--accent);
}

.lib-search {
  flex: 1;
  max-width: 340px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--pink-line);
  border-radius: 999px;
  padding: 10px 16px;
}

.lib-search svg {
  width: 16px;
  height: 16px;
  color: #c98aa8;
  flex-shrink: 0;
  margin-right: 8px;
}

.lib-search input {
  border: none;
  outline: none;
  background: none;
  font-size: 13.5px;
  width: 100%;
  color: var(--ink);
}

.lib-search input::placeholder {
  color: #c3a9b6;
}

.shelf-section {
  margin-bottom: 46px;
}

.shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.shelf-head h3 {
  font-size: 19px;
}

.shelf-empty {
  color: var(--ink-soft);
  font-size: 13.5px;
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.shelf-row {
  display: none;
}

/* legacy, superseded by shelf-wrapper below */

.shelf-wrapper {
  position: relative;
  width: 100%;
  perspective: 1000px;
  padding-bottom: 6px;
}

.shelf-wrapper + .shelf-wrapper {
  margin-top: 28px;
}

.books-row {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 18px;
  position: relative;
  z-index: 5;
  margin-bottom: 5px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.glossy-shelf {
  height: 20px;
  width: 100%;
  background: #f6dae8;
  position: relative;
  z-index: 1;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.glossy-shelf::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
  background: #fbebf3;
  transform: perspective(100px) rotateX(25deg);
  transform-origin: bottom;
  box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.05);
}

.glossy-shelf::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(255, 255, 255, 0) 20%,
      rgba(0, 0, 0, 0.05) 100%);
  border-radius: inherit;
}

.book-item {
  position: relative;
  width: 90px;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 2;
}

.book-item:hover {
  transform: translateY(-8px) rotate(-2deg);
}

.book-item .event-bubble {
  font-size: 10px !important;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: #616161;
  padding: 8px 12px;
  border-radius: 12px;
  white-space: nowrap;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  font-family: 'Outfit';
  font-weight: 700;
}

.book-item .event-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.book-item:hover .event-bubble {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

.book-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  background-color: var(--pink-deep);
  overflow: hidden;
  box-shadow:
    0 5px 10px -2px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  border: none;
}

.book-cover::before {
  content: "";
  position: absolute;
  top: 0.5px;
  bottom: 0.5px;
  left: 0;
  right: 0;
  border-radius: inherit;
  background: linear-gradient(to right,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.05) 0.75%,
      rgba(255, 255, 255, 0.5) 1.0%,
      rgba(255, 255, 255, 0.6) 1.3%,
      rgba(255, 255, 255, 0.5) 1.4%,
      rgba(255, 255, 255, 0.3) 1.5%,
      rgba(255, 255, 255, 0.3) 2.4%,
      rgba(0, 0, 0, 0.05) 2.7%,
      rgba(0, 0, 0, 0.05) 3.5%,
      rgba(255, 255, 255, 0.3) 4%,
      rgba(255, 255, 255, 0.3) 4.5%,
      transparent 5.4%,
      transparent 99%,
      rgba(0, 0, 0, 0.1) 100%);
  z-index: 2;
  pointer-events: none;
}

.shelf-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.55);
  z-index: 3;
}

.shelf-progress-fill {
  height: 100%;
  background: var(--accent);
}

/* Empty state */
.empty-state {
  background: var(--white);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.empty-state h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--ink-soft);
  margin-bottom: 20px;
}

/* Media sections (Movies, Series, Anime, Cartoons, Music, Poems, Manga) */
.media-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.media-page-head .page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}

.page-head-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--pink-deep), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: var(--card-shadow);
}

.page-head-icon svg {
  width: 26px;
  height: 26px;
}

.media-add {
  margin-bottom: 28px;
  max-width: 640px;
  flex-wrap: wrap;
}

.media-add .lib-search {
  flex: 1;
  min-width: 180px;
}

/* grid card cover (rect media) */
.media-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  position: relative;
}

.media-cover svg {
  width: 40px;
  height: 40px;
}

.media-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card {
  position: relative;
}

.media-cover-slot {
  position: relative;
}

.media-cover-slot .media-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
}

.media-cover-slot .media-edit-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
}

.media-remove svg,
.media-edit-btn svg {
  width: 14px;
  height: 14px;
}

.media-remove,
.media-edit-btn {
  opacity: 0;
  transition: .2s;
}

.media-card:hover .media-remove,
.media-card:hover .media-edit-btn {
  opacity: 1;
}

/* Music: vinyl-style covers, 1:1 acrylic sleeve + disc peeking from behind, contained in card */
.media-card {
  overflow: hidden;
}

.vinyl-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  margin-bottom: 12px;
}

.vinyl-disc {
  position: absolute;
  top: 8%;
  right: -22%;
  width: 84%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  box-shadow: -6px 0 14px -6px rgba(0, 0, 0, 0.4);
  z-index: 1;
  overflow: hidden;
}

.vinyl-disc-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.vinyl-sleeve {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  z-index: 2;
  overflow: hidden;
}

.vinyl-sleeve img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vinyl-sleeve svg {
  width: 34px;
  height: 34px;
}

.media-shelf-item {
  position: relative;
  overflow: visible;
}

.media-shelf-item .vinyl-wrap {
  width: 78px;
  margin-bottom: 0;
  overflow: visible;
}

.media-shelf-item .vinyl-disc {
  right: -30%;
}

.media-shelf-item:has(.vinyl-wrap) {
  width: 78px;
}

.vinyl-row {
  align-items: center;
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-wrap:hover .vinyl-disc-img,
.media-shelf-item:hover .vinyl-disc-img {
  animation: vinyl-spin 2.4s linear infinite;
}

.progress-row-body h4 {
  font-family: 'Outfit';
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.progress-pct {
  font-size: 11.5px;
  color: var(--ink-soft);
}

/* Shelf edit button (small pencil, top-right of each shelf item) */
.shelf-edit-btn {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 6;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--pink-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c98aa8;
  cursor: pointer;
  opacity: 0;
  transition: .2s;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.25);
}

.shelf-edit-btn svg {
  width: 12px;
  height: 12px;
}

.media-shelf-item:hover .shelf-edit-btn {
  opacity: 1;
}

/* Media edit modal */
.media-edit-modal {
  position: fixed;
  inset: 0;
  background: rgba(43, 31, 39, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}

.media-edit-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.media-edit-card {
  background: var(--white);
  border-radius: 24px;
  padding: 28px;
  width: 420px;
  max-width: 92vw;
  box-shadow: var(--shadow);
  transform: translateY(10px);
  transition: .2s;
}

.media-edit-modal.show .media-edit-card {
  transform: translateY(0);
}

.media-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.media-edit-title {
  font-size: 18px;
}

.media-edit-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--pink-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  cursor: pointer;
}

.media-edit-close svg {
  width: 14px;
  height: 14px;
}

.media-edit-body {
  display: flex;
  gap: 20px;
  margin-bottom: 22px;
}

.media-edit-preview {
  width: 120px;
  flex-shrink: 0;
}

.media-edit-preview .media-cover,
.media-edit-preview .vinyl-wrap {
  width: 120px;
}

.media-edit-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-edit-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 4px;
}

.media-edit-input {
  border: 1px solid var(--pink-line);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: 'Outfit';
  font-size: 13.5px;
  outline: none;
  background: var(--cream);
}

.media-edit-input:focus {
  border-color: var(--pink-deep);
}

.media-edit-photo-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: var(--pink-line);
  color: var(--accent);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}

.media-edit-photo-btn:hover {
  background: var(--pink);
}

.media-edit-photo-btn svg {
  width: 15px;
  height: 15px;
}

.media-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Book detail */
.back-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: .2s;
}

.back-btn:hover {
  color: var(--accent);
}

.book-detail {
  background: var(--white);
  border-radius: 32px;
  padding: 44px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 25px 40px -12px rgba(224, 87, 142, 0.4);
}

.detail-info h1 {
  font-size: 34px;
  margin-bottom: 6px;
  line-height: 1.1;
}

.detail-author {
  font-weight: 400;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 16px;
  margin-bottom: 18px;
}

.detail-blurb {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 26px;
  max-width: 520px;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.icon-btn-lg {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--pink-line);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
  transition: .2s;
}

.icon-btn-lg:hover {
  background: var(--pink-line);
}

.icon-btn-lg svg {
  width: 18px;
  height: 18px;
}

.icon-btn-lg.saved {
  background: var(--pink);
}

.detail-progress {
  max-width: 400px;
  margin-bottom: 26px;
}

.detail-meta {
  display: flex;
  gap: 36px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.meta-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.meta-val {
  font-size: 14px;
  font-weight: 700;
}

.detail-quote {
  font-family: 'Outfit', sans-serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  border-left: 3px solid var(--pink-deep);
  padding-left: 18px;
  max-width: 480px;
}

.detail-quote span {
  display: block;
  font-size: 13px;
  font-style: normal;
  color: var(--ink-soft);
  margin-top: 8px;
  font-family: 'Outfit';
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: .3s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 1180px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }

  .book-detail {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 260px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-row-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .sidebar {
    display: none;
  }

  #mobile-fab-nav {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
  }

  .main {
    padding: 24px 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 28px 22px;
    min-height: 0;
  }

  .hero-slide-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-copy h1 {
    font-size: 26px;
    line-height: 1.28;
    margin-bottom: 10px;
  }

  .hero-copy h1 br.hero-br-desktop {
    display: none;
  }

  .hero-copy h1 br.hero-br-mobile {
    display: inline;
  }

  .eyebrow {
    margin-bottom: 8px;
  }

  .hero-sub {
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 18px;
  }

  .btn-primary {
    font-size: 13px;
    padding: 11px 18px;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .books-row {
    gap: 8px;
  }

  .books-row.vinyl-row {
    gap: 20px;
  }

  .book-item {
    width: calc((100% - 32px) / 5);
  }

  .media-shelf-item .vinyl-wrap {
    width: 100%;
  }

  .media-shelf-item:has(.vinyl-wrap) {
    width: calc((100% - 32px) / 5);
  }

  .book-row-4 {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .book-grid {
    gap: 10px;
  }

  .book-card {
    width: calc((100% - 20px) / 3);
    padding: 8px;
    border-radius: 14px;
  }

  .book-row-4 .book-card {
    padding: 8px;
    border-radius: 14px;
  }

  .book-card .cover-wrap,
  .book-row-4 .cover-wrap {
    margin-bottom: 8px;
    border-radius: 8px;
  }

  .book-card .save-toggle,
  .book-row-4 .save-toggle {
    width: 22px;
    height: 22px;
    top: 5px;
    right: 5px;
  }

  .book-card .save-toggle svg,
  .book-row-4 .save-toggle svg {
    width: 11px;
    height: 11px;
  }

  .book-card h4,
  .book-row-4 h4 {
    font-size: 11px;
    line-height: 1.25;
    margin-bottom: 2px;
  }

  .book-card p,
  .book-row-4 p {
    font-size: 9.5px;
  }
}

/* ================= Accounts: profile chip, account menu, auth modal ================= */
.profile {
  position: relative;
  cursor: pointer;
}

.signin-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  font-size: 13.5px;
  transition: .2s;
}

.signin-chip:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 50;
  min-width: 140px;
}

.account-menu-signout {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  color: var(--ink);
  transition: .15s;
}

.account-menu-signout:hover {
  background: var(--cream);
  color: var(--accent);
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 31, 39, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.auth-modal {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 380px;
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.auth-modal-tabs {
  display: flex;
  gap: 6px;
  background: var(--cream);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 9px 10px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: .18s;
}

.auth-tab.active {
  background: var(--accent);
  color: var(--white);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.auth-field input {
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--pink-line);
  background: var(--cream);
  color: var(--ink);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--pink-deep);
}

.auth-error {
  font-size: 12.5px;
  color: var(--accent);
  background: var(--pink-line);
  padding: 8px 12px;
  border-radius: 8px;
}

.auth-submit {
  margin-top: 4px;
  width: 100%;
}

/* ================= Saved page: section pills, folder chips ================= */
.saved-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 16px;
}

.saved-pill {
  border: 1.5px solid var(--pink-line);
  background: var(--white);
  color: var(--ink-soft);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: .18s;
  white-space: nowrap;
}

.saved-pill:hover {
  border-color: var(--pink-deep);
}

.saved-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.saved-folder-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.saved-folders {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.folder-chip {
  border: 1.5px dashed var(--pink-deep);
  background: var(--cream);
  color: var(--accent);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: .18s;
  white-space: nowrap;
}

.folder-chip.active {
  background: var(--accent);
  border-style: solid;
  color: var(--white);
}

.folder-chip-delete-mode {
  border-style: solid;
  border-color: var(--ink-soft);
  color: var(--ink-soft);
  background: var(--white);
}

.saved-new-folder-btn {
  font-size: 12.5px;
  padding: 7px 14px;
  white-space: nowrap;
}

.saved-folder-select {
  margin-top: 8px;
  width: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1.5px solid var(--pink-line);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
}
