/* ============================================================
   教程资料库 · 样式
   ============================================================ */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #16181d;
  --ink-2: #5a6472;
  --ink-3: #8b95a3;
  --line: #e4e8ee;
  --line-2: #eef1f5;
  --brand: #1f4fd8;
  --brand-ink: #163aa5;
  --brand-soft: #ecf1ff;
  --amber: #c9760a;
  --amber-soft: #fdf4e3;
  --green: #0b8f5c;
  --green-soft: #e8f8f1;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 8px 24px -10px rgba(16, 24, 40, 0.16);
  --shadow-3: 0 24px 60px -24px rgba(16, 24, 40, 0.32);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

/* ============================ 顶栏 ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, #2b5ce6, #163aa5);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: -1px;
  box-shadow: 0 4px 12px -4px rgba(31, 79, 216, 0.55);
}

.brand-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  padding-left: 8px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
  letter-spacing: 0.5px;
}

/* 搜索框 */
.search-box {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box .icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--ink-3);
  pointer-events: none;
}

#searchInput {
  width: 100%;
  height: 38px;
  padding: 0 52px 0 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  outline: none;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}

#searchInput::placeholder {
  color: var(--ink-3);
}

#searchInput:focus {
  background: var(--surface);
  border-color: #b7c7f5;
  box-shadow: 0 0 0 3px rgba(31, 79, 216, 0.1);
}

.search-box kbd {
  position: absolute;
  right: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: all 0.16s;
  white-space: nowrap;
}

.btn:hover {
  border-color: #cfd6e2;
  color: var(--ink);
  background: var(--surface-2);
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn.primary:hover {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
}

.btn.active {
  background: var(--amber-soft);
  border-color: #f0d5a4;
  color: var(--amber);
}

.btn .fav-count {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(201, 118, 10, 0.14);
  border-radius: 4px;
  padding: 0 4px;
  min-width: 16px;
  text-align: center;
}

/* ============================ 分类条 ============================ */

.cat-bar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.cat-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-inner::-webkit-scrollbar {
  display: none;
}

.cat-item {
  position: relative;
  padding: 11px 12px;
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.16s, border-color 0.16s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-item:hover {
  color: var(--ink);
}

.cat-item.on {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

.cat-item .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  background: var(--line-2);
  border-radius: 4px;
  padding: 0 5px;
}

.cat-item.on .num {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ============================ 主体布局 ============================ */

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* 侧栏 */
.sidebar {
  position: sticky;
  top: 108px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.side-block .side-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-title .clear {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.side-title .clear.show {
  opacity: 1;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: all 0.14s;
}

.tag:hover {
  border-color: #c9d3e6;
  color: var(--ink);
}

.tag.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.level-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.level-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink-2);
  transition: background 0.14s, color 0.14s;
  width: 100%;
  text-align: left;
}

.level-item:hover {
  background: var(--surface);
  color: var(--ink);
}

.level-item.on {
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 600;
}

.level-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-1);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--ink-2);
}

.stat-row + .stat-row {
  border-top: 1px dashed var(--line-2);
}

.stat-row b {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
}

/* 内容区 */
.content {
  min-width: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.result-hint {
  font-size: 13px;
  color: var(--ink-2);
}

.result-hint b {
  color: var(--ink);
  font-family: var(--mono);
}

.chip-group {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.sort-select {
  height: 30px;
  padding: 0 26px 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a3' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 8px center;
  appearance: none;
  outline: none;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.sort-select:focus {
  border-color: #b7c7f5;
}

/* 卡片网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
  min-height: 158px;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #cdd8ee;
  box-shadow: var(--shadow-2);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-ink);
  background: var(--brand-soft);
  font-family: var(--mono);
}

.card-head {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-title::after {
  content: "";
}

.card-domain {
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: var(--mono);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-desc {
  font-size: 12.8px;
  line-height: 1.65;
  color: var(--ink-2);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 9px;
  border-top: 1px dashed var(--line-2);
  flex-wrap: wrap;
}

.mini-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.mini-tag.lv {
  border-color: transparent;
  background: var(--line-2);
  color: var(--ink-2);
}

.mini-tag.lv-入门 {
  background: var(--green-soft);
  color: var(--green);
}

.mini-tag.lv-进阶 {
  background: var(--amber-soft);
  color: var(--amber);
}

.mini-tag.paid {
  background: #fdf0f0;
  color: #b4443a;
}

.fav-btn {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transition: all 0.15s;
  flex-shrink: 0;
}

.fav-btn:hover {
  background: var(--amber-soft);
  color: var(--amber);
}

.fav-btn.on {
  color: var(--amber);
}

.fav-btn svg {
  width: 15px;
  height: 15px;
}

.card-link {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  z-index: 1;
}

.card .fav-btn,
.card .del-btn {
  position: relative;
  z-index: 2;
}

.del-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transition: all 0.15s;
  flex-shrink: 0;
}

.del-btn:hover {
  background: #fdeeee;
  color: #b4443a;
}

.del-btn svg {
  width: 14px;
  height: 14px;
}

/* 空状态 */
.empty {
  display: none;
  text-align: center;
  padding: 70px 20px;
  color: var(--ink-3);
}

.empty.show {
  display: block;
}

.empty-mark {
  font-size: 34px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.empty h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 600;
}

.empty p {
  margin: 0;
  font-size: 13px;
}

/* ============================ 抽屉 ============================ */

.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.32);
  backdrop-filter: blur(2px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.drawer-mask.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: var(--surface);
  z-index: 101;
  box-shadow: var(--shadow-3);
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.drawer-head .close {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
}

.drawer-head .close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 30px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field label .req {
  color: #c0392b;
  margin-left: 2px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  outline: none;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.field textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  background: var(--surface);
  border-color: #b7c7f5;
  box-shadow: 0 0 0 3px rgba(31, 79, 216, 0.09);
}

.field .hint {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 4px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.drawer-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  background: var(--surface-2);
}

.drawer-foot .btn {
  flex: 1;
  justify-content: center;
  height: 38px;
}

/* 管理列表 */
.manage-list {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 16px;
}

.manage-list h3 {
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
  font-weight: 700;
}

.mrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 13px;
}

.mrow .t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mrow .badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand);
  flex-shrink: 0;
}

.mrow .rm {
  color: var(--ink-3);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 5px;
}

.mrow .rm:hover {
  background: #fdeeee;
  color: #b4443a;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 12px);
  background: #1c2333;
  color: #fff;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}

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

/* ============================ 响应式 ============================ */

@media (max-width: 940px) {
  .main {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
    gap: 0;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    gap: 0;
    margin-bottom: 16px;
    overflow: hidden;
    min-width: 0;
  }

  .sidebar .side-block:nth-child(2),
  .sidebar .stat-card {
    display: none;
  }

  .side-block {
    width: 100%;
    min-width: 0;
  }

  .tag-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    min-width: 0;
  }

  .tag {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .tag-list::-webkit-scrollbar {
    display: none;
  }

  .side-block .side-title {
    display: none;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }

  .brand-sub {
    display: none;
  }

  .search-box {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }

  .search-box kbd {
    display: none;
  }

  #searchInput {
    padding-right: 12px;
  }

  .header-actions .btn span {
    display: none;
  }

  .cat-inner {
    padding: 0 14px;
  }

  .main {
    padding: 14px;
  }
}

/* 删除按钮悬停才出现，卡片不至于太杂 */
.card .del-btn {
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.card:hover .del-btn,
.card:focus-within .del-btn {
  opacity: 1;
}

@media (hover: none) {
  .card .del-btn { opacity: 1; }
}

/* 卡片上的「转存」按钮，只出现在网盘链接的卡片上 */
.save-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1;
  transition: all 0.15s;
  margin-left: auto;
}

.save-btn svg {
  width: 11px;
  height: 11px;
}

.save-btn:hover {
  border-color: #b7c7f5;
  color: var(--brand);
  background: var(--brand-soft);
}

.save-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.save-btn + .del-btn {
  margin-left: 4px;
}

/* ==================== 电子书卡片 ==================== */

.card.book {
  flex-direction: row;
  gap: 13px;
  padding: 14px;
  min-height: 126px;
  align-items: stretch;
}

.book-cover {
  width: 58px;
  flex-shrink: 0;
  border-radius: 5px;
  padding: 9px 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: inset -4px 0 7px -3px rgba(0, 0, 0, .32);
}

.book-cover::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, .16);
}

.bc-ini {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
}

.bc-cat {
  font-size: 9px;
  color: rgba(255, 255, 255, .7);
  letter-spacing: .5px;
  line-height: 1.25;
}

.book-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.book-head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.book-title {
  flex: 1;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ink);
}

.book-head .fav-btn {
  margin-left: 0;
  margin-top: -3px;
  width: 24px;
  height: 24px;
}

.book-author {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-desc {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--ink-2);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 8px;
  margin-top: 7px;
  border-top: 1px dashed var(--line-2);
  flex-wrap: wrap;
}

.fmt {
  font-size: 11px;
  line-height: 1.6;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand);
  white-space: nowrap;
  font-weight: 500;
}

.fmt.paid {
  background: #fdf0f0;
  color: #b4443a;
}

.book-foot .del-btn { opacity: 0; }
.card.book:hover .book-foot .del-btn { opacity: 1; }

.grid {
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
}

/* 封面固定高度，别被卡片拉伸；简介占两行，卡片高度才对得齐 */
.book-cover {
  height: 88px;
  align-self: flex-start;
}

.book-desc {
  min-height: 2.55em;
}

.book-body {
  min-height: 88px;
}

/* ==================== 页脚：介绍 / 打赏 / 免责 ==================== */

.site-foot {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.foot-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 20px;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.foot-block h4 {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: .3px;
}

.foot-block h4::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: var(--brand);
  margin-right: 7px;
  vertical-align: -1px;
}

.foot-block p {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.foot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-2);
  font-size: 12px;
  color: var(--ink-3);
}

.foot-bar a {
  color: var(--ink-3);
  transition: color .15s;
}

.foot-bar a:hover {
  color: var(--brand);
}

.foot-bar .dot {
  opacity: .5;
}

@media (max-width: 860px) {
  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .foot-inner {
    padding: 20px 18px 16px;
  }
}

/* 前台不开放删除入口，删除统一放到后台，避免访客误删 */
.card .del-btn,
.manage-list .del-btn {
  display: none !important;
}

/* ==================== 评分与阅读量 ==================== */

.score {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: #fdf3e3;
  color: #a86a1a;
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.reads {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reads svg {
  width: 12px;
  height: 12px;
  opacity: .8;
}

/* 底部标签行：评分/格式/阅读量/标签挤一行时留足空间 */
.book-foot {
  gap: 6px;
  row-gap: 5px;
}

.book-foot .mini-tag {
  height: 18px;
  line-height: 18px;
}

/* 简介占位从 2 行降到 1.6 行，给底部腾空间 */
.book-desc {
  min-height: 0;
}

/* 阅读量靠右，视觉上跟左边标签分开 */
.book-foot .reads {
  margin-left: auto;
}

.book-foot .del-btn {
  margin-left: 4px;
}
