/* =========================================================================
   书架（多书切换入口）
   配色沿用「暖纸书房」主题：米纸 #FAF6EF / 青墨绿 #3A6B5C / 琥珀金 #D9A441
   ========================================================================= */
.shelf-mask {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(28, 26, 22, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
  animation: shelf-fade .18s ease;
}
@keyframes shelf-fade { from { opacity: 0 } to { opacity: 1 } }

.shelf-panel {
  width: 100%; max-width: 560px; max-height: 86vh;
  background: #FAF6EF;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .28);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: shelf-up .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes shelf-up { from { transform: translateY(24px); opacity: .6 } to { transform: none; opacity: 1 } }

/* ---- 头部 ---- */
.shelf-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(58, 107, 92, .14);
}
.shelf-head h2 { margin: 0; font-size: 19px; color: #2F4A42; letter-spacing: .5px; }
.shelf-close {
  border: 0; background: transparent; font-size: 18px; line-height: 1;
  color: #7A8B84; cursor: pointer; padding: 6px 8px; border-radius: 8px;
}
.shelf-close:hover { background: rgba(58, 107, 92, .1); color: #2F4A42; }

/* ---- 公共成长概览条（跨书累计）---- */
.shelf-metabar {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  padding: 10px 18px;
  font-size: 12.5px; color: #5C6F67;
  background: rgba(217, 164, 65, .1);
  border-bottom: 1px solid rgba(58, 107, 92, .1);
}

/* ---- 书列表 ---- */
.shelf-list { overflow-y: auto; padding: 12px 14px 16px; -webkit-overflow-scrolling: touch; }

.shelf-book {
  display: flex; align-items: stretch; gap: 12px;
  padding: 12px; margin-bottom: 10px;
  background: #fff; border: 1px solid rgba(58, 107, 92, .16);
  border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.shelf-book:last-child { margin-bottom: 0; }
.shelf-book.active {
  border-color: #D9A441;
  box-shadow: 0 0 0 2px rgba(217, 164, 65, .22);
  background: linear-gradient(180deg, #FFFBF2, #fff);
}

.shelf-spine {
  flex: 0 0 54px; display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  background: rgba(58, 107, 92, .08);
  border-radius: 10px;
}
.shelf-book.active .shelf-spine { background: rgba(217, 164, 65, .16); }

.shelf-book-body { flex: 1 1 auto; min-width: 0; }
.shelf-book-title { font-size: 15.5px; font-weight: 700; color: #2F4A42; }
.shelf-book-sub { font-size: 12px; color: #8A9A92; margin-top: 2px; }
.shelf-book-tag {
  margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: #6B7D75;
  /* 3 行：书籍简介是"这本书能给我什么"，两行会把后半句（给用户的出路）切掉，
     只剩前半句的痛点，读起来像半句话。 */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.shelf-book-stat { margin-top: 8px; font-size: 12px; color: #3A6B5C; font-weight: 600; }
.shelf-fresh { color: #A9B4AE; font-weight: 500; }

.shelf-book-act { flex: 0 0 auto; display: flex; align-items: center; }
.shelf-btn {
  border: 0; cursor: pointer;
  background: #3A6B5C; color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  transition: opacity .15s, transform .1s;
}
.shelf-btn:hover { opacity: .9; }
.shelf-btn:active { transform: scale(.96); }
.shelf-btn:disabled { background: #A9B4AE; cursor: default; }

.shelf-badge.on {
  font-size: 12px; font-weight: 700; color: #8A6318;
  background: rgba(217, 164, 65, .2);
  padding: 5px 12px; border-radius: 999px;
}

.shelf-empty {
  padding: 34px 16px; text-align: center;
  color: #8A9A92; font-size: 14px; line-height: 1.8;
}
.shelf-empty code {
  background: rgba(58, 107, 92, .1); padding: 2px 6px; border-radius: 5px; font-size: 12.5px;
}

/* ---- 底部说明 ---- */
.shelf-foot {
  padding: 10px 18px 14px;
  font-size: 11.5px; color: #A0ACA6; text-align: center;
  border-top: 1px solid rgba(58, 107, 92, .1);
}
