/* =================================================================
   The Cozy Study — Stylesheet
   Aesthetic: warm wood + caramel, lamp-lit reading nook, immersive
   ================================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --wood: #5C3A24;
  --wood-deep: #3E2416;
  --wood-light: #8B5E3C;
  --caramel: #C97B3B;
  --caramel-light: #E0A063;
  --caramel-soft: #D9A878;
  --cream: #FBF4E9;
  --cream-deep: #F5E9D8;
  --paper: #FFFCF6;
  --ink: #3A2A20;
  --ink-soft: #5A4A3A;
  --muted: #8A7A6A;
  --muted-deep: #6B5D50;
  --lamp: rgba(255, 200, 114, 0.35);
  --line: rgba(92, 58, 36, 0.16);
  --line-soft: rgba(196, 154, 108, 0.35);

  /* category palette */
  --cat-fiction: #C44536;
  --cat-history: #2A6F6F;
  --cat-science: #B68B40;
  --cat-philosophy: #6B4E71;
  --cat-poetry: #A63A3A;
  --cat-other: #3A6B4E;

  --serif-display: "Fraunces", Georgia, "Times New Roman", serif;
  --serif-body: "Lora", Georgia, serif;
  --sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --shadow-card: 0 2px 6px rgba(92, 58, 36, 0.10), 0 12px 28px rgba(92, 58, 36, 0.14);
  --shadow-card-hover: 0 6px 14px rgba(92, 58, 36, 0.16), 0 22px 48px rgba(92, 58, 36, 0.22);
  --shadow-panel: -22px 0 60px rgba(40, 24, 16, 0.32);

  --radius: 8px;
  --radius-lg: 14px;
  --header-h: 72px;
  --transition: 0.32s cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(201, 123, 59, 0.08), transparent 42%),
    radial-gradient(circle at 85% 5%, rgba(92, 58, 36, 0.06), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(224, 160, 99, 0.07), transparent 55%);
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--caramel); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
input, select { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--serif-display); font-weight: 600; color: var(--wood-deep); line-height: 1.18; }

/* wood grain texture overlay */
.wood-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.23 0 0 0 0 0.14 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =================================================================
   HEADER (frosted nav)
   ================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 244, 233, 0.86);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(92, 58, 36, 0.95);
  border-bottom-color: rgba(201, 123, 59, 0.4);
  box-shadow: 0 4px 22px rgba(40, 24, 16, 0.16);
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 12px 32px;
  display: flex; align-items: center; gap: 24px;
}
.brand-link {
  display: flex; align-items: center; gap: 12px;
  color: var(--wood); text-decoration: none; flex-shrink: 0;
}
.brand-link:hover { text-decoration: none; }
.site-header.scrolled .brand-link,
.site-header.scrolled .soft-nav-item,
.site-header.scrolled .night-toggle,
.site-header.scrolled .filter-toggle { color: var(--cream); }
.brand-mark { color: var(--caramel); display: flex; transition: color var(--transition); }
.site-header.scrolled .brand-mark { color: var(--caramel-light); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-title {
  font-family: var(--serif-display); font-weight: 600; font-size: 21px;
  letter-spacing: -0.01em; color: inherit;
}
.brand-sub {
  font-family: var(--serif-body); font-style: italic; font-size: 12px;
  color: var(--muted); letter-spacing: 0.06em; margin-top: 2px;
}
.site-header.scrolled .brand-sub { color: var(--caramel-light); }

/* soft category nav */
.soft-nav {
  margin-left: 20px; display: flex; gap: 4px; align-items: center;
  flex: 1; overflow-x: auto; scrollbar-width: none;
}
.soft-nav::-webkit-scrollbar { display: none; }
.soft-nav-item {
  background: transparent; border: 1px solid transparent;
  color: var(--wood-light); font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  transition: all var(--transition);
}
.soft-nav-item:hover { background: rgba(201, 123, 59, 0.10); color: var(--wood); }
.soft-nav-item.active { background: var(--caramel); color: var(--cream); }
.site-header.scrolled .soft-nav-item:hover { background: rgba(255, 255, 255, 0.12); }

/* header tools */
.header-tools {
  margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.header-search {
  position: relative; display: flex; align-items: center;
}
.header-search svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.site-header.scrolled .header-search svg { color: var(--caramel-light); }
.header-search input {
  width: 180px; background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 8px 14px 8px 34px; font-size: 14px; color: var(--ink);
  font-family: var(--sans); transition: all var(--transition);
}
.header-search input:focus {
  outline: none; border-color: var(--caramel);
  background: var(--paper); box-shadow: 0 0 0 3px rgba(201, 123, 59, 0.15);
  width: 220px;
}
.site-header.scrolled .header-search input {
  background: rgba(255, 255, 255, 0.12); color: var(--cream); border-color: rgba(255, 255, 255, 0.2);
}
.site-header.scrolled .header-search input::placeholder { color: rgba(251, 244, 233, 0.6); }
.night-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line-soft); color: var(--wood);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.night-toggle:hover { background: rgba(201, 123, 59, 0.12); border-color: var(--caramel); }
.filter-toggle {
  display: none; align-items: center; gap: 8px;
  background: var(--wood); color: var(--cream);
  border: 1px solid var(--wood); border-radius: 999px;
  padding: 9px 18px; font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  transition: background var(--transition);
}
.filter-toggle:hover { background: var(--wood-deep); }

/* =================================================================
   HERO SCENE (immersive lamp-lit nook)
   ================================================================= */
.hero-scene {
  position: relative; z-index: 2;
  min-height: 560px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--cream-deep), var(--cream));
  padding: 60px 24px 70px; overflow: hidden;
  margin-bottom: 36px;
}
.hero-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.lamp-glow {
  position: absolute; top: -60px; right: 18%; width: 440px; height: 440px; border-radius: 50%;
  background: var(--lamp); filter: blur(80px);
}
.shelf-silhouette {
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(180deg, transparent, rgba(92, 58, 36, 0.06));
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  max-width: 860px;
}
.hero-eyebrow {
  font-family: var(--serif-body); font-style: italic; font-size: 15px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--caramel); margin: 0 0 16px;
}
.hero-title {
  font-family: var(--serif-display); font-weight: 600;
  font-size: clamp(38px, 6vw, 60px); line-height: 1.08;
  margin: 0 0 18px; color: var(--wood-deep);
  letter-spacing: -0.02em;
}
.hero-sub {
  font-family: var(--serif-body); font-size: 18px; line-height: 1.7;
  color: var(--ink-soft); max-width: 560px; margin: 0 auto 36px;
}
.hero-cards {
  display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
  perspective: 1000px;
}
.hero-card {
  background: none; border: none; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 130px; transition: transform var(--transition);
}
.hero-card:hover { transform: rotate(0deg) translateY(-8px) scale(1.04) !important; }
.hero-card-cover {
  width: 120px; aspect-ratio: 2/3; border-radius: 6px;
  overflow: hidden; box-shadow: 0 8px 22px rgba(40, 24, 16, 0.28), 0 2px 6px rgba(40, 24, 16, 0.18);
  background: var(--cream-deep);
  border: 3px solid var(--paper);
}
.hero-card-img { width: 100%; height: 100%; object-fit: cover; }
.hero-card-img.ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-display); font-weight: 600; font-size: 42px;
  color: var(--caramel); background: linear-gradient(135deg, var(--cream-deep), var(--caramel-soft));
}
.hero-card-title {
  font-family: var(--serif-display); font-size: 13px; font-weight: 500; color: var(--wood);
  margin: 0; text-align: center; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* =================================================================
   SHELF NAV (bookshelf pills)
   ================================================================= */
.shelf-nav-wrap {
  position: relative; z-index: 2;
  padding: 0 32px 24px; max-width: 1440px; margin: 0 auto;
}
.shelf-nav {
  display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none;
  padding: 6px 0 10px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
}
.shelf-nav::-webkit-scrollbar { display: none; }
.shelf-nav.dragging { cursor: grabbing; scroll-behavior: auto; }
/* 滚动提示：左右渐变 */
.shelf-nav-wrap::before,
.shelf-nav-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 24px;
  width: 48px;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.3s;
}
.shelf-nav-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--cream) 0%, var(--cream) 30%, transparent 100%);
  box-shadow: inset -10px 0 20px rgba(92, 58, 36, 0.08);
}
.shelf-nav-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--cream) 0%, var(--cream) 30%, transparent 100%);
  box-shadow: inset 10px 0 20px rgba(92, 58, 36, 0.08);
}
/* 当滚动到边缘时，隐藏对应渐变 */
.shelf-nav-wrap.scrolled-start::before { opacity: 0; }
.shelf-nav-wrap.scrolled-end::after { opacity: 0; }
.shelf-pill {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 10px 16px 10px 10px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
  box-shadow: 0 2px 8px rgba(92, 58, 36, 0.06);
}
.shelf-pill:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(92, 58, 36, 0.14); border-color: var(--caramel); }
.shelf-icon {
  width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.shelf-name {
  font-family: var(--serif-display); font-size: 14px; font-weight: 500; color: var(--wood);
}

/* =================================================================
   FLOW MODULES (comfort list / book of day / author note)
   ================================================================= */
.flow { position: relative; z-index: 2; padding: 0 32px 40px; }
.flow-inner {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px;
}
.flow-module {
  background: var(--paper); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-card);
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
}
.flow-module.big { padding: 32px; }

/* comfort list */
.cl-hero { display: flex; gap: 22px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
.cl-cover {
  flex: 0 0 120px; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(40, 24, 16, 0.22); background: var(--cream-deep);
}
.cl-img { width: 100%; height: 100%; object-fit: cover; }
.cl-img.ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-display); font-weight: 600; font-size: 40px; color: var(--caramel);
}
.cl-hero-text { flex: 1; min-width: 0; }
.cl-kicker {
  font-family: var(--serif-body); font-style: italic; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--caramel); margin: 0 0 8px;
}
.cl-hero-text h2 {
  font-family: var(--serif-display); font-weight: 600; font-size: 24px; line-height: 1.2;
  color: var(--wood-deep); margin: 0 0 6px;
}
.cl-author { font-family: var(--serif-body); font-style: italic; font-size: 14px; color: var(--caramel); margin: 0 0 12px; }
.cl-sell { font-family: var(--serif-body); font-size: 15px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 16px; }
.cl-btn {
  align-self: flex-start; background: var(--caramel); color: var(--cream); border: none;
  border-radius: 999px; padding: 9px 20px;
  font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  transition: background var(--transition);
}
.cl-btn:hover { background: var(--wood); }
.cl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cl-list li {
  display: flex; align-items: center; gap: 14px; padding: 10px 6px;
  border-radius: var(--radius); cursor: pointer; transition: background var(--transition);
  counter-increment: cl-counter;
}
.cl-list li:hover { background: var(--cream-deep); }
.cl-list { counter-reset: cl-counter; }
.cl-num::before {
  content: counter(cl-counter, decimal-leading-zero);
  font-family: var(--serif-display); font-size: 16px; font-weight: 600; color: var(--caramel);
  width: 28px; flex-shrink: 0;
}
.cl-item-meta { flex: 1; min-width: 0; }
.cl-item-title { font-family: var(--serif-display); font-size: 15px; font-weight: 500; color: var(--wood); margin: 0; }
.cl-item-author { font-family: var(--serif-body); font-size: 13px; color: var(--muted); margin: 0; }
.cl-item-year {
  font-family: var(--serif-display); font-size: 13px; color: var(--caramel); font-variant-numeric: tabular-nums;
}

/* book of day */
.day-kicker {
  font-family: var(--serif-body); font-style: italic; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--caramel); margin: 0 0 16px;
}
.day-cover {
  width: 110px; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden;
  margin: 0 auto 18px; box-shadow: 0 8px 20px rgba(40, 24, 16, 0.24); background: var(--cream-deep);
}
.day-img { width: 100%; height: 100%; object-fit: cover; }
.day-img.ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-display); font-weight: 600; font-size: 38px; color: var(--caramel);
}
#book-of-day h3 {
  font-family: var(--serif-display); font-weight: 600; font-size: 20px; color: var(--wood-deep);
  margin: 0 0 4px; text-align: center; line-height: 1.25;
}
.day-author {
  font-family: var(--serif-body); font-style: italic; font-size: 14px; color: var(--caramel);
  margin: 0 0 16px; text-align: center;
}
.day-quote {
  font-family: var(--serif-body); font-style: italic; font-size: 15px; line-height: 1.6;
  color: var(--ink-soft); margin: 0 0 18px; padding: 14px 16px;
  background: var(--cream-deep); border-left: 3px solid var(--caramel); border-radius: 0 var(--radius) var(--radius) 0;
}
.day-btn {
  margin-top: auto; align-self: center; background: var(--wood); color: var(--cream); border: none;
  border-radius: 999px; padding: 9px 22px;
  font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  transition: background var(--transition);
}
.day-btn:hover { background: var(--wood-deep); }

/* author note */
.note-kicker {
  font-family: var(--serif-body); font-style: italic; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--caramel); margin: 0 0 16px;
}
#author-note h3 {
  font-family: var(--serif-display); font-weight: 600; font-size: 20px; color: var(--wood-deep);
  margin: 0 0 4px;
}
.note-on {
  font-family: var(--serif-body); font-style: italic; font-size: 14px; color: var(--caramel);
  margin: 0 0 14px;
}
.note-on em { color: var(--wood); font-style: italic; }
.note-text {
  font-family: var(--serif-body); font-size: 15px; line-height: 1.65; color: var(--ink-soft);
  margin: 0 0 18px;
}
.note-btn {
  margin-top: auto; align-self: flex-start; background: transparent; color: var(--caramel);
  border: 1px solid var(--caramel); border-radius: 999px; padding: 8px 18px;
  font-family: var(--serif-display); font-size: 13px; font-weight: 500;
  transition: all var(--transition);
}
.note-btn:hover { background: var(--caramel); color: var(--cream); }

/* =================================================================
   LAYOUT + FILTER BAR
   ================================================================= */
.layout { position: relative; z-index: 2; }
.main-col { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

.filter-bar {
  position: sticky; top: var(--header-h); z-index: 40;
  background: var(--cream-deep);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 2px 12px rgba(92, 58, 36, 0.05);
}
.filter-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.filter-label {
  font-family: var(--serif-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.filter-search { flex: 1 1 220px; }
.search-wrap { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-wrap input {
  width: 100%; background: var(--paper);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 10px 12px 10px 36px; font-size: 15px; color: var(--ink);
  font-family: var(--serif-body); transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap input:focus {
  outline: none; border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(201, 123, 59, 0.14);
}

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 10px 32px 10px 12px; font-size: 15px; font-family: var(--serif-body);
  cursor: pointer; min-width: 150px; transition: border-color var(--transition), box-shadow var(--transition);
}
.select-wrap select:focus { outline: none; border-color: var(--caramel); box-shadow: 0 0 0 3px rgba(201, 123, 59, 0.14); }
.select-chevron { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--caramel); pointer-events: none; }

/* dual range slider */
.range-wrap { position: relative; width: 210px; height: 38px; display: flex; flex-direction: column; }
.range-track {
  position: absolute; top: 14px; left: 0; right: 0; height: 4px;
  background: rgba(201, 123, 59, 0.30); border-radius: 2px;
}
#range-fill {
  position: absolute; height: 100%; border-radius: 2px;
  background: var(--caramel);
}
.range-wrap input[type=range] {
  position: absolute; top: 8px; left: 0; width: 100%; height: 16px;
  margin: 0; background: transparent; pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
.range-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--caramel);
  box-shadow: 0 1px 4px rgba(92, 58, 36, 0.25); cursor: pointer; pointer-events: all;
  transition: transform 0.15s ease;
}
.range-wrap input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range-wrap input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--caramel); cursor: pointer; pointer-events: all;
}
.range-vals {
  position: absolute; bottom: -2px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}

.reset-btn {
  background: transparent; color: var(--wood);
  border: 1px solid var(--caramel); border-radius: var(--radius);
  padding: 10px 16px; font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  letter-spacing: 0.02em; transition: all var(--transition);
  align-self: flex-end;
}
.reset-btn:hover { background: var(--wood); color: var(--cream); border-color: var(--wood); }

/* =================================================================
   RESULTS META
   ================================================================= */
.results-meta {
  max-width: 1440px; margin: 0 auto; padding: 22px 32px 6px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.results-count {
  font-family: var(--serif-display); font-size: 15px; font-weight: 600;
  color: var(--wood); margin: 0; letter-spacing: 0.02em;
}
.results-hint {
  font-family: var(--serif-body); font-style: italic; font-size: 14px;
  color: var(--muted); margin: 0;
}

/* =================================================================
   GRID + CARDS
   ================================================================= */
#main { position: relative; z-index: 2; }
.grid {
  max-width: 1440px; margin: 0 auto; padding: 20px 32px 60px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.grid.scatter { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: cardIn 0.5s cubic-bezier(.22, .61, .36, 1) both;
  will-change: transform;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--caramel);
}
body.panel-open #main { transform: translateX(-5%); transition: transform 0.4s cubic-bezier(.22, .61, .36, 1); }

.card-thumb {
  position: relative; width: 100%; aspect-ratio: 2/3;
  background: var(--cream-deep); overflow: hidden;
}
.card-thumb-img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85) contrast(1.02);
  opacity: 0; transition: opacity 0.6s ease, filter 0.6s ease;
}
.card-thumb-img.loaded { opacity: 1; filter: saturate(1) contrast(1.02); }
.card-thumb-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(201, 123, 59, 0.16), transparent 55%),
    linear-gradient(135deg, var(--cream-deep), var(--caramel-soft));
}
.card-thumb-placeholder span {
  font-family: var(--serif-display); font-weight: 600; font-size: 60px;
  color: var(--caramel); opacity: 0.55;
}

/* ribbon: Editor's Pick */
.card-ribbon {
  position: absolute; top: 0; left: 0;
  background: var(--wood); color: var(--cream);
  font-family: var(--serif-display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 12px 5px 10px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
  z-index: 2;
}
/* award medal */
.card-medal {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--caramel); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; box-shadow: 0 2px 6px rgba(92, 58, 36, 0.3);
  border: 1.5px solid var(--cream);
  cursor: help;
}
.card-medal svg { width: 14px; height: 14px; }

.card-body { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title {
  font-family: var(--serif-display); font-weight: 600; font-size: 17px; line-height: 1.25;
  color: var(--wood-deep); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.5em;
}
.card-sub {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--serif-body); font-size: 14px; color: var(--caramel);
}
.card-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--caramel); display: inline-block; }
.card-sub .year { font-variant-numeric: tabular-nums; color: var(--muted-deep); font-weight: 500; }
.card-desc {
  font-family: var(--serif-body); font-style: italic; font-size: 14px; font-weight: 400;
  color: var(--ink-soft); line-height: 1.45; margin: 2px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-meta {
  margin-top: auto; padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(180deg, transparent, rgba(251, 244, 233, 0.5));
}
.card-meta-text {
  font-family: var(--serif-display); font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.card-meta-text .sep { color: var(--caramel); }

.card-links { display: flex; align-items: center; gap: 8px; }
.card-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--wood); background: rgba(201, 123, 59, 0.12);
  border: 1px solid var(--line-soft);
  transition: all var(--transition); text-decoration: none;
}
.card-link:hover { background: var(--wood); color: var(--cream); border-color: var(--wood); text-decoration: none; transform: scale(1.08); }
.card-link.disabled { opacity: 0.35; pointer-events: none; }
.card-link svg { width: 14px; height: 14px; }

/* category dot */
.cat-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--caramel); transition: transform var(--transition);
}
.card:hover .cat-dot { transform: scale(1.3); }

/* sentinel + loader */
.sentinel { height: 1px; }
.loader {
  grid-column: 1 / -1; text-align: center; padding: 30px;
  font-family: var(--serif-body); font-style: italic; color: var(--muted);
}
.loader::after { content: "❦"; display: block; margin-top: 8px; color: var(--caramel); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* empty state */
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 80px 24px;
  font-family: var(--serif-body); color: var(--ink-soft);
}
.empty-ornament { font-size: 32px; color: var(--caramel); margin-bottom: 12px; }
.empty-state p { font-size: 18px; margin: 0 0 20px; }
.empty-state .reset-btn { align-self: center; }

/* =================================================================
   COMMUNITY (reader letters / check-in / stationery)
   ================================================================= */
.community {
  position: relative; z-index: 2;
  background: linear-gradient(180deg, var(--cream), var(--cream-deep));
  padding: 50px 32px; margin-top: 30px;
}
.community-grid {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px;
}
.comm-block {
  background: var(--paper); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-card); border: 1px solid var(--line-soft);
}
.comm-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }
.comm-head h3 {
  font-family: var(--serif-display); font-weight: 600; font-size: 20px; color: var(--wood-deep);
  margin: 0;
}
.comm-head span { font-family: var(--serif-body); font-style: italic; font-size: 13px; color: var(--muted); }

.message-wall { display: flex; flex-direction: column; gap: 14px; }
.letter {
  margin: 0; padding: 14px 16px; background: var(--cream-deep); border-radius: var(--radius);
  border-left: 3px solid var(--caramel);
}
.letter p {
  font-family: var(--serif-body); font-style: italic; font-size: 14px; line-height: 1.55;
  color: var(--ink-soft); margin: 0 0 6px;
}
.letter cite {
  font-family: var(--serif-display); font-size: 12px; color: var(--caramel); font-style: normal;
}

.checkin { display: flex; flex-direction: column; gap: 14px; }
.checkin-stat {
  display: flex; align-items: baseline; gap: 10px;
  padding: 10px 0; border-bottom: 1px dashed var(--line-soft);
}
.checkin-stat:last-of-type { border-bottom: none; }
.cs-num {
  font-family: var(--serif-display); font-weight: 600; font-size: 28px; color: var(--caramel);
  font-variant-numeric: tabular-nums;
}
.cs-lab {
  font-family: var(--serif-body); font-size: 14px; color: var(--ink-soft);
}
.comm-btn {
  margin-top: 8px; align-self: stretch; background: var(--caramel); color: var(--cream); border: none;
  border-radius: var(--radius); padding: 12px;
  font-family: var(--serif-display); font-size: 15px; font-weight: 500;
  transition: background var(--transition);
}
.comm-btn:hover { background: var(--wood); }

.stationery { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.stationery li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: var(--cream-deep); border-radius: var(--radius);
}
.stationery span { font-family: var(--serif-display); font-size: 15px; font-weight: 500; color: var(--wood); }
.stationery em {
  font-family: var(--serif-body); font-style: italic; font-size: 13px; color: var(--caramel);
}

/* =================================================================
   FOOTER
   ================================================================= */
.site-footer {
  position: relative; z-index: 2;
  background: var(--wood-deep); color: var(--cream);
  margin-top: 0; padding: 50px 32px 0;
}
.footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1.6fr; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(201, 123, 59, 0.25);
}
.footer-title { font-family: var(--serif-display); font-weight: 600; font-size: 22px; margin: 0 0 6px; color: var(--caramel-light); }
.footer-motto { font-family: var(--serif-body); font-style: italic; font-size: 15px; color: var(--cream); opacity: 0.8; margin: 0; }
.footer-col h4 {
  font-family: var(--serif-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--caramel-light);
  margin: 0 0 14px;
}
.footer-col a { display: block; color: var(--cream); opacity: 0.82; padding: 4px 0; font-size: 15px; }
.footer-col a:hover { color: var(--caramel-light); opacity: 1; text-decoration: none; }
.footer-col p { font-size: 14.5px; line-height: 1.65; opacity: 0.8; margin: 0; }
.footer-bottom {
  max-width: 1440px; margin: 0 auto; padding: 18px 0 24px;
  text-align: center; font-family: var(--serif-body); font-style: italic;
  font-size: 13px; color: var(--caramel-light); opacity: 0.7;
}

/* =================================================================
   FLOATING TOOLS (back-to-top + mini player)
   ================================================================= */
.floating-tools {
  position: fixed; bottom: 24px; right: 24px; z-index: 45;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
}
.back-top {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--wood); color: var(--cream); border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(40, 24, 16, 0.3);
  opacity: 0; pointer-events: none; transition: all var(--transition);
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { background: var(--wood-deep); transform: translateY(-2px); }
.mini-player {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 8px 16px 8px 8px; box-shadow: var(--shadow-card);
}
.mp-play {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--caramel); color: var(--cream); border: none;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.mp-play:hover { background: var(--wood); }
.mp-play.playing { background: var(--wood); }
.mp-info { display: flex; flex-direction: column; gap: 3px; }
.mp-track {
  font-family: var(--serif-display); font-size: 12px; font-weight: 500; color: var(--wood);
  margin: 0;
}
.mp-wave { display: flex; gap: 2px; align-items: end; height: 10px; }
.mp-wave span {
  width: 2px; background: var(--caramel); border-radius: 1px; height: 4px;
  animation: wave 1.2s ease-in-out infinite;
}
.mp-wave span:nth-child(2) { animation-delay: 0.15s; height: 7px; }
.mp-wave span:nth-child(3) { animation-delay: 0.3s; height: 10px; }
.mp-wave span:nth-child(4) { animation-delay: 0.45s; height: 6px; }
.mp-wave span:nth-child(5) { animation-delay: 0.6s; height: 8px; }
@keyframes wave { 0%, 100% { height: 4px; } 50% { height: 10px; } }
.mp-play:not(.playing) ~ .mp-info .mp-wave span { animation-play-state: paused; }

/* =================================================================
   DETAIL PANEL (right slide-in)
   ================================================================= */
.panel-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(40, 24, 16, 0.42);
  opacity: 0; transition: opacity var(--transition);
  backdrop-filter: blur(2px);
}
.panel-overlay.show { opacity: 1; }
.detail-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: 42%; min-width: 380px; max-width: 620px;
  background: var(--cream);
  background-image: radial-gradient(circle at 90% 6%, rgba(201, 123, 59, 0.10), transparent 40%);
  box-shadow: var(--shadow-panel);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.22, .61, .36, 1);
  border-left: 1px solid var(--line-soft);
}
.detail-panel.open { transform: translateX(0); }
.panel-close {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--paper); color: var(--wood);
  border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.panel-close:hover { background: var(--wood); color: var(--cream); transform: rotate(90deg); }
.panel-drag { display: none; }

.panel-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--caramel) transparent;
}
.panel-scroll::-webkit-scrollbar { width: 8px; }
.panel-scroll::-webkit-scrollbar-thumb { background: var(--caramel); border-radius: 4px; }
.panel-scroll::-webkit-scrollbar-track { background: transparent; }

.panel-content { padding: 36px 40px 20px; }
.panel-hero {
  display: flex; gap: 24px; margin-bottom: 26px;
  padding-bottom: 24px; border-bottom: 1px solid var(--line-soft);
}
.panel-thumb {
  flex: 0 0 130px; aspect-ratio: 2/3; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
  background: var(--cream-deep);
}
.panel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.panel-hero-text { flex: 1; min-width: 0; }
.panel-eyebrow {
  font-family: var(--serif-body); font-style: italic; font-size: 13px;
  letter-spacing: 0.1em; color: var(--caramel); margin: 0 0 8px;
}
#panel-title {
  font-family: var(--serif-display); font-weight: 600; font-size: 28px; line-height: 1.15;
  color: var(--wood-deep); margin: 0 0 10px;
}
.panel-author {
  font-family: var(--serif-body); font-size: 16px; color: var(--caramel);
  margin: 0 0 14px; font-style: italic;
}
.panel-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.panel-tag {
  font-family: var(--serif-display); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(201, 123, 59, 0.16); color: var(--wood);
  border: 1px solid var(--line-soft);
}
.panel-tag.first { background: var(--caramel); color: var(--cream); border-color: var(--caramel); }

.panel-section { margin-bottom: 26px; }
.panel-section h4 {
  font-family: var(--serif-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--caramel);
  margin: 0 0 12px; display: flex; align-items: center; gap: 10px;
}
.panel-section h4::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

.panel-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px;
}
.panel-meta-item { display: flex; flex-direction: column; gap: 2px; }
.panel-meta-item .k {
  font-family: var(--serif-display); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.panel-meta-item .v { font-family: var(--serif-body); font-size: 15px; color: var(--ink); }

.panel-desc {
  font-family: var(--serif-body); font-size: 16px; line-height: 1.75; color: var(--ink);
  white-space: pre-line;
}
.panel-desc h2 {
  font-family: var(--serif-display); font-weight: 600; font-size: 19px;
  color: var(--wood-deep); margin: 22px 0 8px;
}
.panel-desc h2:first-child { margin-top: 0; }

.panel-author-bio {
  font-family: var(--serif-body); font-size: 15px; line-height: 1.7; color: var(--ink-soft);
  font-style: italic; padding: 16px 20px;
  background: rgba(201, 123, 59, 0.10); border-left: 3px solid var(--caramel); border-radius: 0 var(--radius) var(--radius) 0;
}
.panel-award {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; background: rgba(201, 123, 59, 0.14);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  font-family: var(--serif-body); font-size: 14.5px; color: var(--wood-deep); line-height: 1.55;
}
.panel-award .medal-ico { color: var(--caramel); flex-shrink: 0; margin-top: 1px; }

.panel-discover {
  font-family: var(--serif-body); font-style: italic; font-size: 16px;
  color: var(--wood); padding: 12px 18px;
  background: rgba(92, 58, 36, 0.06); border-radius: var(--radius);
  border: 1px dashed rgba(92, 58, 36, 0.25);
}

.panel-ext-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius);
  background: var(--caramel); color: var(--cream);
  font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  letter-spacing: 0.02em; transition: background var(--transition); text-decoration: none;
}
.panel-ext-link:hover { background: var(--wood); text-decoration: none; }
.panel-ext-link.disabled { background: var(--muted); opacity: 0.5; pointer-events: none; }

.panel-nav {
  display: flex; gap: 12px; padding: 14px 40px;
  border-top: 1px solid var(--line-soft);
  background: var(--cream-deep);
}
.panel-nav-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: var(--radius);
  background: var(--paper); color: var(--wood);
  border: 1px solid var(--line-soft);
  font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.panel-nav-btn:hover { background: var(--wood); color: var(--cream); border-color: var(--wood); }
.panel-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.panel-nav-btn:disabled:hover { background: var(--paper); color: var(--wood); border-color: var(--line-soft); }

/* =================================================================
   MOBILE FILTER SHEET
   ================================================================= */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(40, 24, 16, 0.5); opacity: 0; transition: opacity var(--transition);
  backdrop-filter: blur(3px);
}
.sheet-overlay.show { opacity: 1; }
.filter-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--cream); border-radius: 18px 18px 0 0;
  max-height: 86vh; display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(.22, .61, .36, 1);
  box-shadow: 0 -10px 40px rgba(40, 24, 16, 0.25);
}
.filter-sheet.open { transform: translateY(0); }
.sheet-handle { width: 44px; height: 5px; background: var(--caramel); border-radius: 3px; margin: 10px auto 4px; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 22px 14px; border-bottom: 1px solid var(--line-soft);
}
.sheet-head h3 { font-family: var(--serif-display); font-weight: 600; font-size: 19px; color: var(--wood-deep); margin: 0; }
.sheet-close {
  width: 34px; height: 34px; border-radius: 50%; background: var(--paper);
  border: 1px solid var(--line-soft); color: var(--wood);
  display: flex; align-items: center; justify-content: center;
}
.sheet-close:hover { background: var(--wood); color: var(--cream); }
.sheet-body { padding: 18px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.sheet-foot {
  display: flex; gap: 12px; padding: 14px 22px 20px;
  border-top: 1px solid var(--line-soft);
}
.apply-btn {
  flex: 1; background: var(--caramel); color: var(--cream);
  border: none; border-radius: var(--radius); padding: 13px;
  font-family: var(--serif-display); font-size: 15px; font-weight: 600;
  transition: background var(--transition);
}
.apply-btn:hover { background: var(--wood); }
.sheet-foot .reset-btn { flex: 0 0 auto; }

/* =================================================================
   INFO PAGES (about / contact / policy)
   ================================================================= */
.page-main {
  position: relative; z-index: 2; max-width: 760px; margin: 0 auto;
  padding: 56px 28px 80px;
}
.page-eyebrow {
  font-family: var(--serif-body); font-style: italic; font-size: 14px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--caramel); margin: 0 0 12px;
}
.page-title {
  font-family: var(--serif-display); font-weight: 600; font-size: clamp(34px, 5vw, 46px);
  color: var(--wood-deep); margin: 0 0 8px; line-height: 1.1;
}
.page-lede {
  font-family: var(--serif-body); font-size: 19px; line-height: 1.7; color: var(--ink-soft);
  font-style: italic; margin: 0 0 36px; padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}
.page-section { margin-bottom: 34px; }
.page-section h2 {
  font-family: var(--serif-display); font-weight: 600; font-size: 24px;
  color: var(--wood-deep); margin: 0 0 12px; display: flex; align-items: center; gap: 12px;
}
.page-section h2::before { content: ""; width: 24px; height: 2px; background: var(--caramel); }
.page-section p { font-size: 17px; line-height: 1.75; color: var(--ink); margin: 0 0 14px; }
.page-section ul { margin: 0 0 14px; padding-left: 22px; }
.page-section li { font-size: 16.5px; line-height: 1.7; color: var(--ink); margin-bottom: 6px; }
.page-section a { color: var(--caramel); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--caramel-soft); }

.contact-card {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 28px 32px; box-shadow: var(--shadow-card); margin-top: 8px;
}
.contact-card .label {
  font-family: var(--serif-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.contact-card .value { font-family: var(--serif-body); font-size: 20px; color: var(--wood-deep); margin-bottom: 18px; }
.contact-card .value a { color: var(--caramel); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--serif-display); font-size: 14px; color: var(--caramel);
  margin-bottom: 26px; transition: gap var(--transition);
}
.back-link:hover { gap: 12px; text-decoration: none; }

/* =================================================================
   DESK FLOATING BOOK DETAIL — 桌面悬浮实体书式详情
   暖色调：木纹 #5C3A24 + 焦糖 #C97B3B + 奶油 #FBF4E9
   交互：点卡片 → 页面柔化模糊 → 书本悬浮于桌面（合上态）→
         点“翻开” → 内页横向展开（双页）→ 点背景/关闭 → 归位
   注意：#detail-panel 始终保留 hidden 属性（display:none），
         由 .desk-open 类覆盖 display 控制可见性，从而隔离共享脚本。
   ================================================================= */

/* 背景遮罩：暖棕半透明 + 毛玻璃模糊，整页柔化以保留书房氛围 */
.desk-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: block; /* 覆盖 hidden 属性的 display:none，以便过渡透明度 */
  background: rgba(92, 58, 36, 0.55);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.desk-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }

/* 锁定背景滚动，保持书房静谧 */
body.desk-active { overflow: hidden; }

/* 悬浮书本容器：水平垂直居中 + 3D 透视；--tilt 由 JS 设置随机倾斜 */
.desk-book {
  position: fixed; top: 50%; left: 50%; z-index: 70;
  width: min(580px, 92vw);
  max-height: 92vh;
  perspective: 1800px;
  /* 默认 hidden 属性 => display:none；由 .desk-open 覆盖为 flex */
}
/* 显式让带 hidden 的内部区块隐藏，避免 display:flex 覆盖 hidden 属性 */
.desk-closed[hidden], .desk-expanded[hidden] { display: none !important; }
.desk-book.desk-open {
  display: flex; flex-direction: column;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82) rotate(var(--tilt, 0deg));
  transition: opacity 0.5s ease,
              transform 0.6s cubic-bezier(.22, .61, .36, 1),
              width 0.5s cubic-bezier(.22, .61, .36, 1);
}
.desk-book.desk-open.desk-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(var(--tilt, 0deg));
}
/* 翻开后：展平（去除倾斜）并加宽以容纳双页 */
.desk-book.desk-open.is-expanded {
  width: min(980px, 96vw);
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

/* 切换上一本/下一本时的轻弹提示 */
.desk-book.desk-bump .desk-closed { animation: deskBump 0.4s ease; }
@keyframes deskBump {
  0% { transform: scale(1); }
  40% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* 关闭 / 上一本 / 下一本 按钮 */
.desk-close, .desk-nav {
  position: absolute; top: 14px; z-index: 6;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(251, 244, 233, 0.94); color: var(--wood);
  border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-display); font-size: 20px; line-height: 1;
  box-shadow: 0 2px 8px rgba(40, 24, 16, 0.18);
  transition: all var(--transition);
}
.desk-close { right: 14px; }
.desk-close:hover { background: var(--wood); color: var(--cream); transform: rotate(90deg); }
.desk-nav {
  top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; font-size: 28px;
}
.desk-nav:hover { transform: translateY(-50%) scale(1.08); background: var(--caramel); color: var(--cream); border-color: var(--caramel); }
.desk-prev { left: -22px; }
.desk-next { right: -22px; }

/* ---------- 合上态：3D 立体封面 + 标题 + 作者 + 推荐 ---------- */
.desk-closed {
  position: relative;
  display: flex; gap: 26px; align-items: center;
  padding: 34px 30px 30px;
  border-radius: 20px;
  border: 1px solid rgba(201, 123, 59, 0.28);
  background-color: var(--cream);
  background-image:
    linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.23 0 0 0 0 0.14 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  background-blend-mode: multiply;
  box-shadow:
    0 2px 6px rgba(92, 58, 36, 0.10),
    0 24px 50px rgba(40, 24, 16, 0.30),
    0 8px 18px rgba(40, 24, 16, 0.18);
}

/* 3D 封面：透视 + 轻微 Y 轴旋转 + 书脊高光，模拟立体书本 */
.desk-cover-wrap { flex: 0 0 150px; perspective: 700px; }
.desk-cover {
  width: 150px; aspect-ratio: 2/3;
  border-radius: 6px 10px 10px 6px;
  background: var(--caramel-soft) center/cover no-repeat;
  box-shadow:
    inset 4px 0 8px rgba(0, 0, 0, 0.18),
    -2px 0 0 rgba(0, 0, 0, 0.10),
    0 14px 28px rgba(40, 24, 16, 0.35),
    0 4px 10px rgba(40, 24, 16, 0.22);
  transform: rotateY(-14deg);
  transform-style: preserve-3d;
  position: relative; overflow: hidden;
}
.desk-cover::after {
  content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
}
.desk-cover.ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-display); font-weight: 600; font-size: 56px;
  color: var(--cream);
  background: linear-gradient(135deg, var(--wood), var(--caramel));
}

.desk-closed-info { flex: 1; min-width: 0; }
.desk-closed-info h3 {
  font-family: var(--serif-display); font-weight: 600;
  font-size: clamp(22px, 3vw, 30px); line-height: 1.15;
  color: var(--wood-deep); margin: 0 0 8px;
}
.desk-author {
  font-family: var(--serif-body); font-style: italic; font-size: 15px;
  color: var(--caramel); margin: 0 0 14px;
}
.desk-rec {
  font-family: var(--serif-body); font-size: 15px; line-height: 1.6;
  color: var(--ink-soft); margin: 0 0 22px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.desk-open-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--caramel); color: var(--cream); border: none;
  border-radius: 999px; padding: 11px 24px;
  font-family: var(--serif-display); font-size: 15px; font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(201, 123, 59, 0.35);
  transition: all var(--transition);
}
.desk-open-btn:hover { background: var(--wood); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(92, 58, 36, 0.4); }

/* ---------- 翻开态：双页展开 + 底部操作栏 ---------- */
.desk-expanded {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--wood) 0%, var(--wood-deep) 100%);
  box-shadow:
    0 2px 6px rgba(92, 58, 36, 0.10),
    0 28px 60px rgba(40, 24, 16, 0.36),
    0 10px 22px rgba(40, 24, 16, 0.22);
}
.desk-spread { display: flex; gap: 14px; }

/* 内页：奶油纸色 + 细微纸张纹理 + 大圆角 */
.desk-page {
  flex: 1; min-width: 0;
  border-radius: 12px;
  padding: 22px 24px;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.42 0 0 0 0 0.28 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
  box-shadow: inset 0 0 0 1px rgba(201, 123, 59, 0.15);
  max-height: 64vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--caramel-soft) transparent;
}
.desk-page::-webkit-scrollbar { width: 6px; }
.desk-page::-webkit-scrollbar-thumb { background: var(--caramel-soft); border-radius: 3px; }
.desk-page::-webkit-scrollbar-track { background: transparent; }
.desk-page-content { padding-right: 4px; }

/* 翻页动画：右页从书脊处横向展开，左页淡入 */
.desk-page-left { animation: pageFadeIn 0.5s ease both; }
.desk-page-right { animation: pageExpand 0.55s cubic-bezier(.22, .61, .36, 1) both; transform-origin: left center; }
@keyframes pageExpand {
  0% { transform: scaleX(0.3); opacity: 0; }
  100% { transform: scaleX(1); opacity: 1; }
}
@keyframes pageFadeIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 区块小标题：焦糖色 + 细分隔线 */
.desk-section-label {
  font-family: var(--serif-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--caramel);
  margin: 0 0 8px; display: flex; align-items: center; gap: 8px;
}
.desk-section-label::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.desk-page-content > .desk-section-label:first-child { margin-top: 0; }
.desk-page-content .desk-section-label { margin-top: 16px; }

/* 左页：暖色摘录 + 内容摘要 + 阅读时长 */
.desk-excerpt {
  position: relative; margin: 0 0 4px; padding: 6px 0 6px 28px;
  font-family: var(--serif-body); font-style: italic; font-size: 15.5px;
  line-height: 1.7; color: var(--ink);
  border-left: 3px solid var(--caramel);
}
.desk-excerpt::before {
  content: "\201C"; position: absolute; left: 6px; top: -10px;
  font-family: var(--serif-display); font-size: 42px; color: var(--caramel-soft); line-height: 1;
}
.desk-summary {
  font-family: var(--serif-body); font-size: 14.5px; line-height: 1.65;
  color: var(--ink-soft); margin: 0;
}
.desk-readtime {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(201, 123, 59, 0.12); color: var(--wood);
  font-family: var(--serif-display); font-size: 13px; font-weight: 500;
}
.desk-readtime svg { width: 14px; height: 14px; color: var(--caramel); flex-shrink: 0; }

/* 右页：作者卡片 */
.desk-author-card {
  background: var(--cream-deep); border-radius: 10px; padding: 12px 14px;
  border-left: 3px solid var(--caramel);
}
.desk-author-card .ac-name {
  font-family: var(--serif-display); font-weight: 600; font-size: 15px;
  color: var(--wood-deep); margin: 0 0 4px;
}
.desk-author-card .ac-bio {
  font-family: var(--serif-body); font-style: italic; font-size: 13.5px; line-height: 1.6;
  color: var(--ink-soft); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* 右页：相关书（横向小卡） */
.desk-related { display: flex; flex-direction: column; gap: 8px; }
.desk-related-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
  background: rgba(251, 244, 233, 0.6); border: 1px solid transparent;
  transition: all var(--transition);
}
.desk-related-item:hover { background: var(--cream-deep); border-color: var(--caramel); transform: translateX(3px); }
.desk-related-cover {
  flex: 0 0 36px; width: 36px; aspect-ratio: 2/3; border-radius: 3px;
  background: var(--wood) center/cover no-repeat;
  box-shadow: 0 2px 5px rgba(40, 24, 16, 0.2);
}
.desk-related-cover.ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-display); font-weight: 600; font-size: 13px; color: var(--cream);
  background: linear-gradient(135deg, var(--wood), var(--caramel));
}
.desk-related-meta { flex: 1; min-width: 0; }
.desk-related-title {
  font-family: var(--serif-display); font-size: 13.5px; font-weight: 500; color: var(--wood-deep);
  margin: 0; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.desk-related-author { font-family: var(--serif-body); font-size: 12px; color: var(--muted); margin: 0; }

/* 右页：读者短评（信件式） */
.desk-reviews { display: flex; flex-direction: column; gap: 10px; }
.desk-review {
  padding: 10px 12px; background: var(--cream-deep); border-radius: 8px;
  border-left: 2px solid var(--caramel-soft);
}
.desk-review p {
  font-family: var(--serif-body); font-style: italic; font-size: 13px; line-height: 1.55;
  color: var(--ink-soft); margin: 0 0 4px;
}
.desk-review cite {
  font-family: var(--serif-display); font-size: 11px; color: var(--caramel);
  font-style: normal; letter-spacing: 0.04em;
}

/* 底部操作栏 */
.desk-actions { display: flex; gap: 10px; padding: 2px 4px 4px; }
.desk-action-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--cream); color: var(--wood);
  border: 1px solid rgba(201, 123, 59, 0.3);
  font-family: var(--serif-display); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.desk-action-btn:hover { background: var(--caramel); color: var(--cream); border-color: var(--caramel); transform: translateY(-2px); }
.desk-action-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.desk-action-btn.is-on { background: var(--caramel); color: var(--cream); border-color: var(--caramel); }

/* =================================================================
   NIGHT MODE
   ================================================================= */
body.night {
  background: #1F1612;
  color: #D9C9B5;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(201, 123, 59, 0.10), transparent 42%),
    radial-gradient(circle at 85% 5%, rgba(92, 58, 36, 0.18), transparent 38%);
}
body.night .wood-grain { opacity: 0.04; }
body.night .site-header { background: rgba(31, 22, 18, 0.9); border-bottom-color: rgba(201, 123, 59, 0.2); }
body.night .hero-scene { background: linear-gradient(180deg, #2A1D16, #1F1612); }
body.night .hero-title, body.night h1, body.night h2, body.night h3 { color: var(--caramel-light); }
body.night .hero-sub, body.night .page-lede, body.night .card-desc { color: #B5A290; }
body.night .card, body.night .flow-module, body.night .comm-block, body.night .contact-card {
  background: #2A1D16; border-color: rgba(201, 123, 59, 0.2); color: #D9C9B5;
}
body.night .card-title, body.night .cl-hero-text h2, body.night .shelf-name { color: var(--caramel-light); }
body.night .filter-bar, body.night .community { background: #1A110D; }
body.night .panel-scroll, body.night .filter-sheet { background: #2A1D16; }
body.night .search-wrap input,
body.night .select-wrap select,
body.night .header-search input { background: rgba(255, 255, 255, 0.06); color: #D9C9B5; border-color: rgba(201, 123, 59, 0.25); }
body.night .day-quote, body.night .letter, body.night .stationery li, body.night .cl-list li:hover { background: rgba(201, 123, 59, 0.08); }

/* 暗色模式下的桌面悬浮书：保持暖意，柔化对比 */
body.night .desk-closed,
body.night .desk-page {
  background-color: #2A1D16;
  background-image: linear-gradient(160deg, #2A1D16, #1F1612);
  color: #D9C9B5;
}
body.night .desk-closed-info h3,
body.night .desk-related-title { color: var(--caramel-light); }
body.night .desk-rec, body.night .desk-summary,
body.night .ac-bio, body.night .desk-review p { color: #B5A290; }
body.night .desk-author-card,
body.night .desk-review { background: rgba(201, 123, 59, 0.10); }
body.night .desk-related-item { background: rgba(255, 255, 255, 0.04); }
body.night .desk-related-item:hover { background: rgba(201, 123, 59, 0.14); }
body.night .desk-action-btn {
  background: #2A1D16; color: var(--caramel-light);
  border-color: rgba(201, 123, 59, 0.3);
}
body.night .desk-readtime { background: rgba(201, 123, 59, 0.16); color: var(--caramel-light); }
body.night .desk-close, body.night .desk-nav { background: rgba(42, 29, 22, 0.94); color: var(--caramel-light); }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1100px) {
  .grid.scatter { grid-template-columns: repeat(3, 1fr); }
  .flow-inner { grid-template-columns: 1fr 1fr; }
  .flow-module.big { grid-column: 1 / -1; }
  .community-grid { grid-template-columns: 1fr 1fr; }
  .comm-block:first-child { grid-column: 1 / -1; }
  .detail-panel { width: 50%; }
}
@media (max-width: 900px) {
  .soft-nav, .header-search, .night-toggle { display: none; }
  .filter-toggle { display: inline-flex; margin-left: auto; }
  .filter-bar { display: none; }
  .filter-bar.show {
    display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 80;
    background: var(--cream); padding: 0; border: none; box-shadow: 0 8px 30px rgba(40, 24, 16, 0.2);
    max-height: 100vh; overflow-y: auto;
  }
  .hero-scene { padding: 40px 20px 50px; min-height: 480px; }
  .hero-cards { gap: 12px; }
  .hero-card { width: 100px; }
  .hero-card-cover { width: 92px; }
  .flow { padding: 0 22px 30px; }
  .flow-inner { grid-template-columns: 1fr; }
  .main-col { padding: 0 22px; }
  .results-meta { padding: 18px 22px 4px; }
  .grid { padding: 18px 22px 50px; gap: 16px; }
  .grid.scatter { grid-template-columns: repeat(2, 1fr); }
  .panel-content { padding: 30px 26px 16px; }
  .panel-nav { padding: 12px 26px; }
  .community { padding: 36px 22px; }
  .community-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .floating-tools { bottom: 16px; right: 16px; }
  .mini-player { display: none; }
}
@media (max-width: 768px) {
  .grid.scatter { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-body { padding: 11px 12px 9px; }
  .card-title { font-size: 15px; min-height: 2.2em; }
  .card-sub { font-size: 12.5px; }
  .card-desc { font-size: 12.5px; -webkit-line-clamp: 1; }
  .card-meta { padding: 8px 12px; }
  .card-meta-text { font-size: 9.5px; gap: 5px; }
  .card-meta-text .binding-mobile { display: none; }
  .card-link { width: 24px; height: 24px; }
  .card-link svg { width: 12px; height: 12px; }
  .card-thumb-placeholder span { font-size: 44px; }

  /* panel becomes full-screen bottom sheet */
  .detail-panel {
    width: 100%; max-width: none; min-width: 0;
    top: auto; bottom: 0; border-radius: 18px 18px 0 0;
    border-left: none; border-top: 1px solid var(--line-soft);
    max-height: 92vh;
  }
  .panel-drag {
    display: block; position: relative; width: 44px; height: 5px;
    background: var(--caramel); border-radius: 3px; margin: 10px auto 0;
  }
  .panel-close { top: 12px; right: 14px; width: 34px; height: 34px; }
  .panel-hero { flex-direction: column; gap: 16px; align-items: flex-start; }
  .panel-thumb { flex: 0 0 auto; width: 110px; }
  #panel-title { font-size: 23px; }
  .panel-meta-grid { grid-template-columns: 1fr; gap: 10px; }
  .panel-content { padding: 22px 22px 14px; }
  .panel-nav { padding: 12px 22px 18px; }
  body.panel-open #main { transform: none; }

  .header-inner { padding: 12px 20px; gap: 14px; }
  .brand-title { font-size: 18px; }
  .brand-sub { font-size: 11px; }
}
@media (max-width: 420px) {
  .grid.scatter { grid-template-columns: 1fr; }
}

/* ---------- 桌面悬浮书：移动端响应式 ---------- */
@media (max-width: 760px) {
  .desk-book { width: 96vw; max-height: 92vh; }
  .desk-book.desk-open,
  .desk-book.desk-open.is-expanded { width: 96vw; }
  /* 合上态：纵向堆叠，封面居中 */
  .desk-closed {
    flex-direction: column; gap: 18px; text-align: center;
    padding: 40px 22px 26px;
  }
  .desk-cover-wrap { flex: 0 0 auto; }
  .desk-cover { width: 120px; }
  .desk-closed-info { width: 100%; }
  .desk-rec { -webkit-line-clamp: 4; }
  .desk-open-btn { align-self: center; }
  /* 翻开态：双页纵向堆叠，整本展开区可滚动，操作栏吸底 */
  .desk-expanded { max-height: 84vh; overflow-y: auto; }
  .desk-spread { flex-direction: column; }
  .desk-page { max-height: none; }
  .desk-page-right { animation: pageFadeIn 0.5s ease both; }
  .desk-actions {
    position: sticky; bottom: 0; padding-top: 12px;
    background: linear-gradient(180deg, transparent, var(--wood) 35%);
  }
  /* 翻页按钮移入内侧，避免溢出屏幕 */
  .desk-nav { width: 36px; height: 36px; font-size: 24px; }
  .desk-prev { left: 8px; }
  .desk-next { right: 8px; }
  .desk-close { top: 10px; right: 10px; width: 34px; height: 34px; }
  /* 操作栏：两两换行 */
  .desk-actions { flex-wrap: wrap; }
  .desk-action-btn { flex: 1 1 calc(50% - 5px); font-size: 13px; padding: 11px 10px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .card { animation: none; }
}
