/* ============================================================
   留白小说 · 组件层
   按钮 / 表单 / 标签 / 书籍卡片 / 列表 / 评分 / 弹层
   纯文字卡片，不使用封面图
   ============================================================ */

/* ---------- 按钮 ---------- */

.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--lb-coral);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: transform .2s var(--lb-ease), background .2s var(--lb-ease),
    color .2s var(--lb-ease), border-color .2s var(--lb-ease), box-shadow .2s var(--lb-ease);
}

.lb-btn:hover {
  transform: translateY(-1px);
  background: var(--lb-coral-deep);
  color: #fff;
  box-shadow: var(--lb-shadow-sm);
}

.lb-btn:active {
  transform: translateY(0);
}

.lb-btn--ghost {
  background: transparent;
  border-color: var(--lb-line-strong);
  color: var(--lb-ink-2);
}

.lb-btn--ghost:hover {
  border-color: var(--lb-coral);
  background: var(--lb-coral-soft);
  color: var(--lb-coral-deep);
  box-shadow: none;
}

.lb-btn--soft {
  background: var(--lb-mint-soft);
  color: var(--lb-mint-deep);
}

.lb-btn--soft:hover {
  background: #dcefe2;
  color: var(--lb-mint-deep);
  box-shadow: none;
}

.lb-btn--sm {
  min-height: 34px;
  padding: 0 15px;
  font-size: 13px;
}

.lb-btn--block {
  width: 100%;
}

.lb-btn[disabled],
.lb-btn.is-disabled {
  opacity: .5;
  pointer-events: none;
}

.lb-link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--lb-muted);
  font-size: 13px;
  transition: color .2s var(--lb-ease);
}

.lb-link-btn:hover {
  color: var(--lb-coral-deep);
}

/* ---------- 表单 ---------- */

.lb-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lb-field > label,
.lb-label {
  color: var(--lb-ink-2);
  font-size: 13px;
  font-weight: 500;
}

.lb-input,
.lb-textarea,
.lb-select {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--lb-line);
  border-radius: 14px;
  background: var(--lb-surface);
  font-size: 14px;
  outline: none;
  transition: border-color .2s var(--lb-ease), box-shadow .2s var(--lb-ease);
}

.lb-textarea {
  height: auto;
  min-height: 120px;
  padding: 13px 16px;
  resize: vertical;
}

.lb-input:focus,
.lb-textarea:focus,
.lb-select:focus {
  border-color: var(--lb-coral);
  box-shadow: 0 0 0 3px rgba(226, 130, 92, .14);
}

.lb-input::placeholder,
.lb-textarea::placeholder {
  color: #bdb49e;
}

.lb-field__hint {
  color: var(--lb-muted);
  font-size: 12px;
}

.lb-field__error {
  color: var(--lb-danger);
  font-size: 12px;
}

.lb-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lb-ink-2);
  font-size: 13px;
  cursor: pointer;
}

.lb-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--lb-coral);
}

.lb-form-note {
  padding: 12px 15px;
  border-radius: 14px;
  background: var(--lb-mint-soft);
  color: var(--lb-mint-deep);
  font-size: 13px;
}

/* ---------- 搜索框 ---------- */

.lb-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 560px;
  height: 52px;
  border: 1px solid var(--lb-line);
  border-radius: 999px;
  background: var(--lb-surface);
  transition: border-color .2s var(--lb-ease), box-shadow .2s var(--lb-ease);
}

.lb-search:focus-within {
  border-color: var(--lb-coral);
  box-shadow: 0 8px 26px rgba(196, 105, 63, .1);
}

.lb-search__icon {
  display: grid;
  place-items: center;
  width: 50px;
  color: var(--lb-muted);
  flex: none;
}

.lb-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 14px;
  outline: none;
}

.lb-search button {
  flex: none;
  margin-right: 6px;
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--lb-coral);
  color: #fff;
  font-size: 13px;
  transition: background .2s var(--lb-ease);
}

.lb-search button:hover {
  background: var(--lb-coral-deep);
}

/* 搜索联想 */
.lb-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  overflow: hidden;
  border: 1px solid var(--lb-line);
  border-radius: 16px;
  background: var(--lb-surface);
  box-shadow: var(--lb-shadow);
}

.lb-suggest a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  font-size: 13px;
}

.lb-suggest a:hover {
  background: var(--lb-coral-soft);
}

.lb-suggest small {
  color: var(--lb-muted);
  font-size: 11px;
}

/* ---------- 标签 / 分类 ---------- */

.lb-tag {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--lb-mint-soft);
  color: var(--lb-mint-deep);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
}

.lb-tag--blush { background: var(--lb-coral-soft); color: var(--lb-coral-deep); }
.lb-tag--mist  { background: var(--lb-sky-soft);  color: #5f8494; }
.lb-tag--sand  { background: var(--lb-butter-soft); color: #96793f; }
.lb-tag--line  { background: transparent; border: 1px solid var(--lb-line-strong); color: var(--lb-muted); }

.lb-tag--static {
  pointer-events: none;
}

.lb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lb-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--lb-line);
  border-radius: 999px;
  background: transparent;
  color: var(--lb-ink-2);
  font-size: 13px;
  transition: background .2s var(--lb-ease), border-color .2s var(--lb-ease), color .2s var(--lb-ease);
}

.lb-chip:hover {
  border-color: var(--lb-coral);
  background: var(--lb-coral-soft);
  color: var(--lb-coral-deep);
}

.lb-chip.is-active {
  border-color: var(--lb-coral);
  background: var(--lb-coral);
  color: #fff;
}

/* 眉题：小贴纸感 */
.lb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--lb-coral-soft);
  color: var(--lb-coral-deep);
  font-size: 12px;
  font-weight: 500;
}

.lb-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lb-coral);
}

/* ---------- 区块标题 ---------- */

.lb-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.lb-section-head h2 {
  position: relative;
  font-size: 23px;
  font-weight: 600;
}

/* 标题下的一笔荧光划线 */
.lb-section-head h2::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -6px;
  width: 44px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 130, 92, .3), rgba(226, 130, 92, .06));
}

.lb-section-head p {
  margin-top: 12px;
  color: var(--lb-muted);
  font-size: 13px;
}

.lb-section-head__more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--lb-muted);
  font-size: 13px;
  flex: none;
  padding-bottom: 2px;
}

.lb-section-head__more:hover {
  color: var(--lb-coral-deep);
}

/* ---------- 书籍文字卡片（无封面） ---------- */

.lb-book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.lb-book-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 20px 20px 22px;
  border-radius: var(--lb-radius-lg);
  background: var(--lb-mint-soft);
  transition: transform .25s var(--lb-ease), box-shadow .25s var(--lb-ease);
}

.lb-book-card:hover {
  transform: translateY(-3px) rotate(-.4deg);
  box-shadow: var(--lb-shadow-sm);
  color: inherit;
}

.lb-book-card--peach  { background: var(--lb-coral-soft); }
.lb-book-card--butter { background: var(--lb-butter-soft); }
.lb-book-card--sky    { background: var(--lb-sky-soft); }

.lb-book-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.lb-book-card__title a:hover {
  color: var(--lb-coral-deep);
}

.lb-book-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lb-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.lb-book-card__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-book-card__intro {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--lb-ink-2);
  font-size: 12px;
  line-height: 1.75;
}

/* ---------- 书籍横列 ---------- */

.lb-book-row {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 16px 6px;
  border-bottom: 1px dashed var(--lb-line);
}

.lb-book-row:last-child {
  border-bottom: 0;
}

.lb-book-row__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.lb-book-row__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.lb-book-row__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lb-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.lb-book-row__desc {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--lb-muted);
  font-size: 12px;
}

.lb-book-row__rank {
  display: grid;
  place-items: center;
  width: 26px;
  flex: none;
  color: var(--lb-line-strong);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lb-book-row__rank.is-top {
  color: var(--lb-coral);
}

/* ---------- 列表 / 分页 ---------- */

.lb-list {
  display: flex;
  flex-direction: column;
}

.lb-list__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--lb-line);
}

.lb-list__item:last-child {
  border-bottom: 0;
}

.lb-list__main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.lb-list__main a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-list__time {
  flex: none;
  color: var(--lb-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.lb-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 42px;
}

.lb-pager a,
.lb-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--lb-line);
  border-radius: 999px;
  color: var(--lb-ink-2);
  font-size: 13px;
  transition: border-color .2s var(--lb-ease), background .2s var(--lb-ease), color .2s var(--lb-ease);
}

.lb-pager a:hover {
  border-color: var(--lb-coral);
  background: var(--lb-coral-soft);
  color: var(--lb-coral-deep);
}

.lb-pager .is-current {
  border-color: var(--lb-coral);
  background: var(--lb-coral);
  color: #fff;
}

.lb-pager .is-disabled {
  opacity: .45;
  pointer-events: none;
}

/* ---------- 空状态 ---------- */

.lb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 70px 20px;
  border: 1px dashed var(--lb-line-strong);
  border-radius: var(--lb-radius-lg);
  background: rgba(255, 253, 247, .7);
  text-align: center;
}

.lb-empty__mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px 18px 18px 5px;
  background: var(--lb-coral-soft);
  color: var(--lb-coral-deep);
  font-size: 20px;
  font-weight: 600;
}

.lb-empty h3 {
  font-size: 16px;
}

.lb-empty p {
  max-width: 360px;
  color: var(--lb-muted);
  font-size: 13px;
}

/* ---------- 评分 ---------- */

.lb-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.lb-rating__star {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lb-line-strong);
  transition: color .15s var(--lb-ease), transform .15s var(--lb-ease);
}

.lb-rating__star:hover {
  transform: scale(1.12);
}

.lb-rating__star.is-on {
  color: #dca64c;
}

.lb-rating__text {
  margin-left: 8px;
  color: var(--lb-muted);
  font-size: 12px;
}

.lb-vote-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lb-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--lb-line-strong);
  border-radius: 999px;
  background: var(--lb-surface);
  color: var(--lb-ink-2);
  font-size: 13px;
  transition: border-color .2s var(--lb-ease), background .2s var(--lb-ease), color .2s var(--lb-ease);
}

.lb-vote-btn:hover {
  border-color: var(--lb-coral);
  background: var(--lb-coral-soft);
  color: var(--lb-coral-deep);
}

.lb-vote-btn.is-on,
.lb-vote-btn[aria-pressed="true"] {
  border-color: var(--lb-coral);
  background: var(--lb-coral);
  color: #fff;
}

.lb-vote-btn:disabled {
  cursor: default;
  opacity: .75;
}

.lb-vote-count {
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .05);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.lb-vote-btn.is-on .lb-vote-count,
.lb-vote-btn[aria-pressed="true"] .lb-vote-count {
  background: rgba(255, 255, 255, .2);
}

.lb-rating-note {
  margin-top: 12px;
  color: var(--lb-muted);
  font-size: 12px;
  min-height: 18px;
}

/* ---------- 面包屑 ---------- */

.lb-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 24px;
  color: var(--lb-muted);
  font-size: 12px;
}

.lb-crumb a:hover {
  color: var(--lb-coral-deep);
}

.lb-crumb span {
  color: var(--lb-line-strong);
}

/* ---------- 弹层 / 提示 ---------- */

.lb-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(60, 50, 34, .3);
  opacity: 0;
  transition: opacity .2s var(--lb-ease);
}

.lb-modal.is-open {
  opacity: 1;
}

.lb-modal__panel {
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: var(--lb-radius-lg);
  background: var(--lb-surface);
  box-shadow: 0 30px 80px rgba(80, 62, 36, .2);
  transform: translateY(10px);
  transition: transform .25s var(--lb-ease);
}

.lb-modal.is-open .lb-modal__panel {
  transform: translateY(0);
}

.lb-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lb-modal__head h3 {
  font-size: 18px;
}

.lb-modal__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--lb-bg-soft);
  color: var(--lb-muted);
}

.lb-modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lb-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.lb-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 180;
  max-width: calc(100vw - 40px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(70, 65, 58, .92);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(80, 62, 36, .2);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .22s var(--lb-ease), transform .22s var(--lb-ease);
}

.lb-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 头像 ---------- */

.lb-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 22px 22px 22px 7px;
  background: var(--lb-mint-soft);
  color: var(--lb-mint-deep);
  font-size: 22px;
  font-weight: 600;
  flex: none;
}

.lb-avatar--sm {
  width: 40px;
  height: 40px;
  border-radius: 14px 14px 14px 5px;
  font-size: 15px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .lb-book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .lb-book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .lb-section-head { align-items: center; }
  .lb-section-head h2 { font-size: 20px; }
  .lb-section-head p { display: none; }
}

@media (max-width: 480px) {
  .lb-search { height: 48px; }
  .lb-search button { padding: 0 15px; }
  .lb-book-grid { gap: 12px; }
  .lb-book-card { padding: 16px 16px 18px; }
  .lb-book-card__intro { display: none; }
  .lb-pager { gap: 5px; }
  .lb-pager a,
  .lb-pager span { min-width: 34px; height: 34px; padding: 0 9px; font-size: 12px; }
}
