.category-page{
  min-height:100vh;
}

.category-topbar{
  position:sticky;
  top:0;
  z-index:40;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:52px;
  padding:6px 0 8px;
  background:transparent;
  border-bottom:0;
  transition:background-color 180ms ease;
  margin-bottom: 0px;
}

.category-topbar::before{
  content:"";
  position:absolute;
  inset:0;
  background:transparent;
  z-index:-1;
  transition:background-color 180ms ease;
}

.category-topbar.is-collapsed{
  background:#0b0f12;
}

.category-topbar.is-collapsed::before{
  background:#0b0f12;
}

.category-back{
  width:34px;
  height:34px;
  border:none;
  background:transparent;
  color:var(--text-main);
  font-size:34px;
  line-height:1;
  padding:0;
  cursor:pointer;
  flex:0 0 auto;
}

.category-topbar-title{
  flex:1 1 auto;
  min-width:0;
  font-size:18px;
  font-weight:700;
  color:var(--text-main);
  opacity:0;
  transform:translateY(8px);
  transition:opacity 180ms ease, transform 180ms ease;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:left;
  pointer-events:none;
  margin-top: 3px;
}

.category-topbar.is-collapsed{
  justify-content:flex-start;
}

.category-hero{
  padding:8px 0 16px;
  will-change:transform, opacity;
  transition:transform 120ms linear, opacity 120ms linear;
}

.category-hero-title{
  margin:0;
  font-size:36px;
  line-height:1.04;
  letter-spacing:-0.6px;
  font-weight:500;
  color:var(--text-main);
}

.category-books-section{
  padding-top:2px;
}

.category-book-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:26px 14px;
}

.category-book-card{
  cursor:pointer;
}

.category-book-cover-wrap{
  width:100%;
  aspect-ratio:0.72 / 1;
  overflow:hidden;
  background:rgba(255,255,255,0.05);
}

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

.category-book-title{
  margin-top:12px;
  font-size:18px;
  line-height:1.18;
  font-weight:800;
  font-style:italic;
  color:var(--text-main);
  letter-spacing:-0.2px;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.category-book-author{
  margin-top:10px;
  font-size:14px;
  line-height:1.3;
  color:rgba(246,247,242,0.72);

  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.category-book-meta{
  margin-top:14px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  font-size:14px;
  font-weight:500;
  color:rgba(246,247,242,0.85);
}

.book-meta-item{
  display:inline-flex;
  align-items:center;
  gap:4px;
}

.book-meta-icon{
  opacity:0.95;
  font-size:14px;
  line-height:1;
}

.book-meta-sep{
  color:rgba(246,247,242,0.42);
}

.scroll-sentinel{
  width:100%;
  height:1px;
}

.loading-more{
  display:none;
  justify-content:center;
  align-items:center;
  padding:18px 0 10px;
  transition:opacity 160ms ease;
}

.loading-more.is-visible{
  display:flex;
}

.loading-dot{
  width:20px;
  height:20px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,0.22);
  border-top-color:rgba(255,255,255,0.82);
  animation:spin 0.8s linear infinite;
}

@keyframes spin{
  to{ transform:rotate(360deg); }
}

@media (max-width: 390px){
  .category-hero-title{ font-size:42px; }
  .category-book-title{ font-size:17px; }
  .category-book-author{ font-size:13px; }
  .category-book-meta{ font-size:13px; }
}