/* ====================================================
   目录页 · 复用品类色板(羊皮纸+海蓝+金)
   ==================================================== */

:root {
  --paper:        #f5ecd9;
  --paper-2:      #ebdfbe;
  --paper-edge:   #d8c89a;
  --ink:          #2b1d10;
  --ink-soft:     #5a4128;
  --ink-faint:    #8a7152;
  --sea:          #1a3a5c;
  --sea-deep:     #0d2540;
  --sea-soft:     #2d588a;
  --gold:         #c89b3c;
  --gold-soft:    #e0c684;
  --crimson:      #8b2c1f;
  --moss:         #4a6b3a;
  --shadow:       0 6px 18px rgba(43, 29, 16, .12);
  --shadow-lg:    0 12px 36px rgba(43, 29, 16, .22);
  --radius:       6px;
  --serif:        'Georgia', 'Iowan Old Style', 'Cambria', serif;
  --sans:         'Inter', 'Helvetica Neue', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(200,155,60,.06), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(43,29,16,.04), transparent 60%);
}

/* ============= TOPBAR ============= */
.cat-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(180deg, var(--sea-deep), var(--sea));
  color: var(--paper);
  box-shadow: var(--shadow);
  gap: 16px;
  flex-wrap: wrap;
}
.cat-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cat-mark  { font-size: 36px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.cat-title { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.cat-en    { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 14px; opacity: .7; margin-left: 6px; }
.cat-tagline { font-size: 13px; color: var(--ink-soft); margin-top: 2px; letter-spacing: .4px; }
.cat-sub   { font-size: 12px; opacity: .8; letter-spacing: .5px; text-transform: none; margin-top: 2px; }
.cat-tools { flex: 0 0 320px; max-width: 100%; }
.cat-search {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: var(--paper);
  font: 14px var(--sans);
  outline: none;
  transition: all .15s ease;
}
.cat-search::placeholder { color: rgba(255,255,255,.55); }
.cat-search:focus { background: rgba(255,255,255,.18); border-color: var(--gold-soft); }

/* ============= MAIN ============= */
.cat-main {
  position: relative; z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 28px 48px;
}

.grade-block { margin-bottom: 36px; }
.grade-head {
  display: flex; align-items: baseline; gap: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 18px;
}
.grade-num {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--sea-deep);
  letter-spacing: 1px;
  line-height: 1;
}
.grade-label {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}
.grade-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: monospace;
}

.bk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.bk-card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 14px;
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: all .18s ease;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.bk-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow-lg);
}
.bk-card.bk-done {
  background: linear-gradient(135deg, var(--paper-2), var(--paper));
  border-color: var(--sea-soft);
}
.bk-card.bk-done::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--moss);
}
.bk-card.bk-stub {
  opacity: .92;
}
.bk-cover {
  flex: 0 0 60px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--paper-edge);
  min-height: 80px;
}
.bk-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bk-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--sea-deep);
  line-height: 1.25;
}
.bk-title-zh {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Noto Sans CJK SC', sans-serif;
  font-size: 14px;
  color: var(--crimson);
  font-weight: 500;
}
.bk-meta {
  font-size: 12px;
  color: var(--ink-faint);
  font-style: italic;
  font-family: var(--serif);
}
.bk-status {
  margin-top: auto;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  align-self: flex-start;
  font-family: var(--sans);
  letter-spacing: .5px;
  font-weight: 600;
}
.st-done {
  background: var(--moss);
  color: var(--paper);
}
.st-stub {
  background: var(--paper);
  color: var(--ink-faint);
  border: 1px dashed var(--paper-edge);
}

/* ============= FOOT ============= */
.cat-foot {
  text-align: center;
  padding: 20px 28px 32px;
  color: var(--ink-faint);
  font-size: 12px;
  border-top: 1px dashed var(--paper-edge);
  margin-top: 24px;
}
.cat-foot small { line-height: 1.6; display: block; margin: 6px 0 10px; }
.cat-foot-brand {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: .3px;
}
.cat-credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 4px;
  color: var(--ink-soft);
}
.cat-credits a { color: var(--sea); text-decoration: none; }
.cat-credits a:hover { text-decoration: underline; }

/* ============= RESPONSIVE ============= */
@media (max-width: 800px) {
  .cat-topbar { padding: 12px 16px; }
  .cat-tools { flex-basis: 100%; }
  .cat-main { padding: 18px 16px 32px; }
  .grade-num { font-size: 24px; }
  .bk-grid { grid-template-columns: 1fr; }
}
