/* ===================================================================
   bookzaap · รีวิวหนังสือ + read tracker
   Theme: พลัม + พริก + มะขาม (แซ่บ)
   v2 — Tracker: timer + heatmap + velocity + ETA  /  Stats: ring + charts
   =================================================================== */

:root {
  --bz-ink: #2B1B2E;
  --bz-ink-soft: #5A4A5E;
  --bz-paper: #FBF6F0;
  --bz-card: #FFFFFF;
  --bz-chili: #E2483B;
  --bz-chili-dk: #C13226;
  --bz-tamarind: #C9772F;
  --bz-leaf: #2F7A52;
  --bz-muted: #9A8B92;
  --bz-line: #ECE1D8;
  --bz-want-bg: #F3ECF3;
  --bz-read-bg: #EAF3EE;
  --bz-display: 'Chonburi', Georgia, serif;
  --bz-body: 'IBM Plex Sans Thai', system-ui, -apple-system, sans-serif;

  --bz-grad-goal: linear-gradient(135deg, #2B1B2E 0%, #4a3450 100%);
  --bz-grad-streak: linear-gradient(135deg, #E2483B 0%, #F4A261 100%);
  --bz-grad-leaf: linear-gradient(135deg, #2F7A52 0%, #5BAE7A 100%);
  --bz-shadow-sm: 0 1px 3px rgba(43,27,46,0.06);
  --bz-shadow: 0 4px 14px rgba(43,27,46,0.08);
  --bz-shadow-lg: 0 10px 32px rgba(43,27,46,0.12);
  --bz-radius: 14px;
  --bz-radius-lg: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ===== utilities ===== */
.bz-row { display: flex; align-items: center; }
.bz-row-gap { display: flex; align-items: center; gap: 8px; }
.bz-mb { margin-bottom: 10px; }
.bz-mt-3 { margin-top: 14px; }
.bz-muted { color: var(--bz-muted); font-size: 13px; }
.bz-flex-1 { flex: 1; min-width: 0; }

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-6 { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== inputs & buttons ===== */
.bz-input {
  padding: 10px 13px;
  border-radius: 9px;
  border: 1.5px solid var(--bz-line);
  font-family: var(--bz-body);
  font-size: 14px;
  color: var(--bz-ink);
  background: var(--bz-card);
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.bz-input:focus { border-color: var(--bz-chili); box-shadow: 0 0 0 3px rgba(226,72,59,0.12); }
.bz-input-lg { padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.bz-input-fixed-60 { width: 60px; }
.bz-input-fixed-70 { width: 70px; }

.bz-textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--bz-line);
  font-family: var(--bz-body);
  font-size: 14px;
  color: var(--bz-ink);
  background: var(--bz-card);
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.bz-textarea:focus { border-color: var(--bz-chili); box-shadow: 0 0 0 3px rgba(226,72,59,0.12); }

.bz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--bz-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.bz-btn:hover { transform: translateY(-1px); }
.bz-btn:active { transform: translateY(0); }
.bz-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.bz-btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.bz-btn-full { width: 100%; }
.bz-btn-primary { background: var(--bz-chili); color: #fff; }
.bz-btn-primary:hover { background: var(--bz-chili-dk); box-shadow: 0 6px 16px rgba(226,72,59,0.3); }
.bz-btn-dark { background: var(--bz-ink); color: #fff; }
.bz-btn-dark:hover { background: #3a2a3e; }
.bz-btn-leaf { background: var(--bz-leaf); color: #fff; }
.bz-btn-leaf:hover { background: #266b46; box-shadow: 0 6px 16px rgba(47,122,82,0.3); }
.bz-btn-danger { background: linear-gradient(135deg, #E2483B, #C13226); color: #fff; box-shadow: 0 4px 12px rgba(226,72,59,0.3); }
.bz-btn-danger:hover { box-shadow: 0 6px 18px rgba(226,72,59,0.45); }
.bz-btn-ghost { background: transparent; color: var(--bz-ink-soft); border: 1.5px solid var(--bz-line); }
.bz-btn-ghost:hover { background: var(--bz-want-bg); border-color: var(--bz-ink-soft); }
.bz-btn-ghost-danger { background: transparent; color: var(--bz-chili-dk); border: 1.5px solid var(--bz-line); }
.bz-btn-ghost-danger:hover { background: #fbe9e6; border-color: var(--bz-chili); }
.bz-btn-outline-tamarind { background: transparent; color: var(--bz-tamarind); border: 1.5px solid var(--bz-tamarind); }
.bz-btn-outline-tamarind:hover { background: var(--bz-tamarind); color: #fff; }

/* ===== cover ===== */
.bz-cover { position: relative; }
.bz-cover-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(43,27,46,0.18);
  overflow: hidden;
  background: #2B1B2E;
}
.bz-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(43,27,46,0.18);
  overflow: hidden;
  background: linear-gradient(135deg, #2B1B2E, #4a3450);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
}
.bz-cover-placeholder span {
  color: #fff;
  font-family: var(--bz-display);
  font-size: 13px;
  line-height: 1.3;
}

/* ===== stars ===== */
.bz-stars { display: flex; gap: 2px; }
.bz-star {
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  color: #D8CBD0;
  cursor: pointer;
  transition: transform .12s, color .12s;
}
.bz-star.on { color: var(--bz-chili); }
.bz-star:hover { transform: scale(1.18); }
.bz-star:disabled { cursor: default; }
.bz-star:disabled:hover { transform: none; }

/* ===== progress ===== */
.bz-progress {
  height: 6px;
  border-radius: 99px;
  background: var(--bz-line);
  overflow: hidden;
}
.bz-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .35s ease;
  background: var(--bz-leaf);
}

/* ===== section ===== */
.bz-section { margin-top: 22px; }
.bz-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--bz-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== chips & pills ===== */
.bz-chip {
  padding: 7px 14px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid var(--bz-line);
  background: transparent;
  color: var(--bz-ink-soft);
  font-family: var(--bz-body);
  transition: all .15s;
}
.bz-chip:hover { transform: translateY(-1px); }
.bz-chip.on { color: #fff; }
.bz-chip-count { opacity: 0.8; margin-left: 2px; }

.bz-chip-soft {
  padding: 5px 12px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--bz-line);
  background: var(--bz-want-bg);
  color: var(--bz-ink-soft);
  font-family: var(--bz-body);
  transition: all .12s;
}
.bz-chip-soft:hover { background: #ECE1F0; transform: translateY(-1px); }

.bz-pill {
  padding: 5px 11px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--bz-line);
  background: transparent;
  color: var(--bz-ink-soft);
  font-family: var(--bz-body);
  transition: all .12s;
}
.bz-pill:hover { transform: translateY(-1px); }
.bz-pill.on { color: #fff; }

/* ===== shelf grid ===== */
.bz-shelf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.bz-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 22px;
}
.bz-shelf-card {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: transform .18s;
}
.bz-shelf-card:hover { transform: translateY(-4px); }
.bz-shelf-card:hover .bz-cover-img,
.bz-shelf-card:hover .bz-cover-placeholder { box-shadow: 0 12px 28px rgba(43,27,46,0.28); }
.bz-shelf-cover { position: relative; }
.bz-shelf-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.bz-shelf-meta { margin-top: 9px; }
.bz-shelf-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--bz-ink);
}
.bz-shelf-author { font-size: 11.5px; color: var(--bz-muted); margin-top: 2px; }
.bz-shelf-progress { margin-top: 7px; }
.bz-shelf-pct { font-size: 10.5px; color: var(--bz-muted); margin-top: 3px; }
.bz-shelf-stars { margin-top: 6px; }

/* ===== discover ===== */
.bz-discover-search { display: flex; gap: 8px; margin-bottom: 12px; }
.bz-suggest-wrap { margin-bottom: 22px; }
.bz-suggest-label {
  font-size: 11px;
  color: var(--bz-muted);
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.bz-suggest-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.bz-status {
  padding: 50px 20px;
  text-align: center;
  color: var(--bz-muted);
  font-size: 14px;
}
.bz-status-icon { font-size: 32px; margin-bottom: 8px; }

.bz-error {
  background: var(--bz-want-bg);
  color: var(--bz-ink-soft);
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid var(--bz-line);
}

.bz-discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 22px;
}
.bz-discover-card {}
.bz-discover-meta { margin-top: 9px; }
.bz-discover-title { font-size: 13.5px; font-weight: 600; line-height: 1.25; color: var(--bz-ink); }
.bz-discover-author { font-size: 11.5px; color: var(--bz-muted); margin: 2px 0 8px; }

/* ===== empty state ===== */
.bz-empty {
  text-align: center;
  padding: 60px 20px;
  background: var(--bz-card);
  border: 1.5px dashed var(--bz-line);
  border-radius: var(--bz-radius-lg);
}
.bz-empty-icon { font-size: 36px; margin-bottom: 10px; }
.bz-empty-title {
  font-family: var(--bz-display);
  font-size: 20px;
  color: var(--bz-ink);
  margin-bottom: 6px;
}
.bz-empty-body { color: var(--bz-muted); font-size: 14px; margin-bottom: 18px; }

/* ===== toast ===== */
.bz-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bz-ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--bz-body);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 100;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.bz-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== overlay & detail ===== */
.bz-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43,27,46,0.45);
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  animation: bzFadeIn .2s;
}
@keyframes bzFadeIn { from { opacity: 0; } to { opacity: 1; } }
.bz-detail {
  width: min(580px, 100%);
  height: 100%;
  background: var(--bz-paper);
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0,0,0,.2);
  animation: bzSlideIn .3s;
}
@keyframes bzSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.bz-detail-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--bz-line);
  position: sticky;
  top: 0;
  background: var(--bz-paper);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bz-detail-title { font-family: var(--bz-display); font-size: 18px; color: var(--bz-ink); }
.bz-detail-close {
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--bz-ink-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.bz-detail-close:hover { background: var(--bz-line); }

.bz-detail-body { padding: 22px; }
.bz-detail-head { display: flex; gap: 18px; }
.bz-detail-cover { width: 110px; flex-shrink: 0; }
.bz-detail-info { flex: 1; min-width: 0; }
.bz-detail-book-title {
  font-family: var(--bz-display);
  font-size: 21px;
  line-height: 1.2;
  color: var(--bz-ink);
  margin: 0 0 5px 0;
}
.bz-detail-book-sub { color: var(--bz-muted); font-size: 13.5px; margin-bottom: 12px; }
.bz-shelf-pills { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== progress block (ring + ETA) ===== */
.bz-progress-block {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #FFFFFF 0%, #FDF8F3 100%);
  border: 1px solid var(--bz-line);
  border-radius: var(--bz-radius-lg);
  box-shadow: 0 4px 16px rgba(43,27,46,0.06);
  transition: box-shadow .2s, transform .15s;
}
.bz-progress-block:hover {
  box-shadow: 0 6px 20px rgba(43,27,46,0.1);
  transform: translateY(-1px);
}
.bz-progress-block-left { flex-shrink: 0; }
.bz-progress-block-right { flex: 1; min-width: 0; }
.bz-progress-pct {
  font-family: var(--bz-display);
  font-size: 36px;
  color: var(--bz-ink);
  line-height: 1;
  font-weight: 700;
}
.bz-progress-pct-sub {
  font-size: 13px;
  color: var(--bz-muted);
  margin-top: 6px;
  font-weight: 500;
}
.bz-eta {
  margin-top: 12px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #EAF3EE 0%, #d6ebe0 100%);
  color: var(--bz-leaf);
  font-size: 13px;
  border-radius: 10px;
  display: inline-block;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(47,122,82,0.1);
}

.bz-ring { display: block; }

/* ===== TRACKER ===== */
.bz-tracker {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* section title for tracker */
.bz-section-title-tracker {
  font-size: 13px;
  font-weight: 700;
  color: var(--bz-ink);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* live timer card */
.bz-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #2B1B2E 0%, #4a3450 100%);
  color: #fff;
  border-radius: var(--bz-radius-lg);
  box-shadow: 0 8px 24px rgba(43,27,46,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.bz-timer::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -30%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(47,122,82,0.2) 0%, transparent 70%);
  pointer-events: none;
  animation: bzGlow 4s ease-in-out infinite;
}
@keyframes bzGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}
.bz-timer.running {
  background: linear-gradient(135deg, #2F7A52 0%, #3db86a 100%);
  box-shadow: 0 8px 28px rgba(47,122,82,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.12);
}
.bz-timer.running::before {
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
}
.bz-timer-left { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bz-timer-pulse {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  opacity: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
}
.bz-timer-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: bzPulse 1.2s infinite;
}
@keyframes bzPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.bz-timer-idle { font-size: 11.5px; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; }
.bz-timer-display {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.bz-timer-sub { font-size: 11.5px; opacity: 0.8; }

/* quick log */
.bz-quick-log {
  background: var(--bz-card);
  border: 1px solid var(--bz-line);
  border-radius: var(--bz-radius-lg);
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(43,27,46,0.04);
}
.bz-quick-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--bz-ink-soft);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.bz-quick-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 480px) {
  .bz-quick-chips { grid-template-columns: repeat(4, 1fr); }
}
.bz-quick-chip {
  padding: 14px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #EAF3EE 0%, #d6ebe0 100%);
  color: var(--bz-leaf);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--bz-body);
  transition: all .18s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.bz-quick-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(47,122,82,0.1) 0%, rgba(47,122,82,0.2) 100%);
  opacity: 0;
  transition: opacity .18s;
}
.bz-quick-chip:hover {
  background: linear-gradient(135deg, #2F7A52 0%, #3db86a 100%);
  color: #fff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(47,122,82,0.35);
  border-color: rgba(255,255,255,0.2);
}
.bz-quick-chip:hover::before { opacity: 1; }
.bz-quick-chip:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 4px 12px rgba(47,122,82,0.3);
}

/* custom log */
.bz-custom-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bz-paper);
  padding: 14px 16px;
  border-radius: var(--bz-radius);
  border: 1px solid var(--bz-line);
}
.bz-custom-log .bz-input {
  background: #fff;
  border-color: var(--bz-line);
}
.bz-custom-log .bz-input:focus {
  border-color: var(--bz-tamarind);
  box-shadow: 0 0 0 3px rgba(201,119,47,0.1);
}

/* session list */
.bz-sessions-list {
  background: var(--bz-card);
  border: 1px solid var(--bz-line);
  border-radius: var(--bz-radius-lg);
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(43,27,46,0.04);
}
.bz-sessions-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bz-ink);
}
.bz-session-row {
  display: grid;
  grid-template-columns: 1fr auto auto 32px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--bz-line);
  font-size: 13px;
  transition: background .15s, transform .12s;
}
.bz-session-row:last-child { border-bottom: none; }
.bz-session-row:hover {
  background: linear-gradient(90deg, var(--bz-paper) 0%, transparent 100%);
  margin: 0 -18px;
  padding: 12px 18px;
  border-radius: 8px;
}
.bz-session-date {
  color: var(--bz-ink);
  font-weight: 600;
  font-family: 'IBM Plex Sans Thai', system-ui, sans-serif;
}
.bz-session-pages {
  color: var(--bz-leaf);
  font-weight: 700;
  background: var(--bz-read-bg);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.bz-session-min {
  color: var(--bz-tamarind);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bz-session-min::before {
  content: "⏱";
  font-size: 11px;
}
.bz-session-del {
  border: none;
  background: none;
  color: var(--bz-muted);
  font-size: 14px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.bz-session-del:hover {
  color: #fff;
  background: var(--bz-chili);
  transform: scale(1.1);
}
.bz-sessions-more {
  font-size: 11.5px;
  color: var(--bz-muted);
  text-align: center;
  padding-top: 12px;
  font-weight: 600;
  margin-top: 4px;
}

/* quotes */
.bz-quote-card {
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--bz-card);
  border: 1px solid var(--bz-line);
  margin-bottom: 8px;
  border-left: 3px solid var(--bz-tamarind);
}
.bz-quote-text { font-size: 13.5px; color: var(--bz-ink); font-style: italic; line-height: 1.5; }
.bz-quote-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; }
.bz-quote-del { border: none; background: none; color: var(--bz-muted); font-size: 11px; cursor: pointer; }
.bz-quote-del:hover { color: var(--bz-chili); }

.bz-desc { font-size: 13px; color: var(--bz-ink-soft); line-height: 1.6; margin: 0; }

/* ===== STATS PAGE ===== */
.bz-page-title {
  font-family: var(--bz-display);
  font-size: 26px;
  color: var(--bz-ink);
  margin-bottom: 4px;
}
.bz-page-sub { color: var(--bz-muted); font-size: 13.5px; margin-bottom: 22px; }

/* row 1: goal + streak */
.bz-stats-row1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 700px) { .bz-stats-row1 { grid-template-columns: 1fr; } }

.bz-card-goal {
  background: var(--bz-grad-goal);
  color: #fff;
  border-radius: var(--bz-radius-lg);
  padding: 22px 24px;
  box-shadow: var(--bz-shadow);
  position: relative;
  overflow: hidden;
}
.bz-card-goal::after {
  content: "";
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(226,72,59,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.bz-card-goal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bz-card-goal-label { font-size: 13px; opacity: 0.85; }
.bz-card-goal-big { margin-top: 6px; display: flex; align-items: baseline; gap: 4px; }
.bz-card-goal-num {
  font-family: var(--bz-display);
  font-size: 48px;
  line-height: 1;
  color: var(--bz-chili);
}
.bz-card-goal-of { font-size: 20px; opacity: 0.5; margin: 0 2px; }
.bz-card-goal-total { font-family: var(--bz-display); font-size: 24px; opacity: 0.9; }
.bz-card-goal-unit { font-size: 13px; opacity: 0.7; margin-left: 2px; }
.bz-card-goal-pct { font-size: 12.5px; opacity: 0.75; margin-top: 6px; }
.bz-card-goal-edit { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.bz-card-goal-edit .bz-input {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-weight: 700;
}
.bz-card-goal-edit .bz-input:focus { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }
.bz-card-goal-edit .bz-muted { color: rgba(255,255,255,0.6); }

/* streak */
.bz-card-streak {
  background: var(--bz-grad-streak);
  color: #fff;
  border-radius: var(--bz-radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--bz-shadow);
  position: relative;
  overflow: hidden;
}
.bz-card-streak::before {
  content: "";
  position: absolute;
  top: -30px;
  left: -30px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.bz-streak-flame { font-size: 32px; line-height: 1; }
.bz-streak-num {
  font-family: var(--bz-display);
  font-size: 50px;
  line-height: 0.95;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.bz-streak-label { font-size: 13px; opacity: 0.95; margin-top: -2px; }
.bz-streak-best { font-size: 12px; opacity: 0.85; background: rgba(0,0,0,0.18); padding: 5px 9px; border-radius: 6px; display: inline-block; align-self: flex-start; }
.bz-streak-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.bz-streak-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.15);
  opacity: 0.55;
  font-weight: 600;
}
.bz-streak-badge.on { background: rgba(255,255,255,0.95); color: var(--bz-chili-dk); opacity: 1; }

/* row 2: stat grid */
.bz-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.bz-stat-card {
  background: var(--bz-card);
  border: 1px solid var(--bz-line);
  border-radius: var(--bz-radius);
  padding: 14px 16px;
  transition: transform .15s, box-shadow .15s;
}
.bz-stat-card:hover { transform: translateY(-2px); box-shadow: var(--bz-shadow); }
.bz-stat-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.bz-stat-icon { font-size: 15px; }
.bz-stat-label { font-size: 12px; color: var(--bz-muted); font-weight: 600; }
.bz-stat-value-row { display: flex; align-items: baseline; gap: 4px; }
.bz-stat-value {
  font-family: var(--bz-display);
  font-size: 28px;
  line-height: 1;
  color: var(--bz-ink);
}
.bz-stat-unit { font-size: 12px; color: var(--bz-muted); font-weight: 500; }

/* row 3: heatmap */
.bz-card-heatmap {
  background: var(--bz-card);
  border: 1px solid var(--bz-line);
  border-radius: var(--bz-radius-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--bz-sm, var(--bz-shadow-sm));
}
.bz-heat-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.bz-card-title { font-size: 15px; font-weight: 700; color: var(--bz-ink); }
.bz-card-sub { font-size: 12px; color: var(--bz-muted); margin-top: 2px; }
.bz-heat-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; }
.bz-heat-legend .bz-muted { font-size: 11px; }

.bz-heat-body { display: flex; gap: 6px; }
.bz-heat-day-labels { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: var(--bz-muted); padding-top: 1px; }
.bz-heat-day-labels span { height: 14px; line-height: 14px; }
.bz-heat-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(7, 14px); gap: 3px; flex: 1; }
.bz-heat-cell {
  width: 100%;
  height: 14px;
  border-radius: 3px;
  background: #F2EBE4;
  transition: transform .1s, box-shadow .12s;
  cursor: default;
}
.bz-heat-cell:hover { transform: scale(1.4); box-shadow: 0 2px 6px rgba(0,0,0,0.2); z-index: 2; position: relative; }
.bz-heat-cell.lvl-0 { background: #F2EBE4; }
.bz-heat-cell.lvl-1 { background: #FBE1D3; }
.bz-heat-cell.lvl-2 { background: #F2A78F; }
.bz-heat-cell.lvl-3 { background: #E9604A; }
.bz-heat-cell.lvl-4 { background: #C13226; box-shadow: 0 0 0 1px rgba(193,50,38,0.15); }

/* row 4: monthly + categories */
.bz-stats-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 700px) { .bz-stats-row2 { grid-template-columns: 1fr; } }

.bz-card-monthly, .bz-card-cats, .bz-card-dist, .bz-card-authors, .bz-card-extremes, .bz-card-reading, .bz-card-quotes {
  background: var(--bz-card);
  border: 1px solid var(--bz-line);
  border-radius: var(--bz-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--bz-shadow-sm);
}

.bz-monthly-chart { margin-top: 14px; }
.bz-monthly-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  padding-bottom: 22px;
  border-bottom: 1.5px solid var(--bz-line);
  position: relative;
}
.bz-monthly-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}
.bz-monthly-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  min-height: 0;
}
.bz-monthly-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--bz-ink);
  margin-bottom: 4px;
  line-height: 1;
  height: 14px;
}
.bz-monthly-bar {
  width: 100%;
  max-width: 28px;
  background: linear-gradient(180deg, var(--bz-chili) 0%, #F4A261 100%);
  border-radius: 4px 4px 0 0;
  transition: height .5s ease, box-shadow .15s;
  min-height: 2px;
}
.bz-monthly-bar.current { box-shadow: 0 0 0 2px rgba(226,72,59,0.25); }
.bz-monthly-lbl {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: var(--bz-muted);
  white-space: nowrap;
}

/* category list */
.bz-cat-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.bz-cat-row { display: grid; grid-template-columns: 110px 1fr 30px; align-items: center; gap: 10px; font-size: 12.5px; }
.bz-cat-name { color: var(--bz-ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-cat-bar-bg { height: 8px; border-radius: 99px; background: var(--bz-line); overflow: hidden; }
.bz-cat-bar-fill { height: 100%; background: var(--bz-tamarind); border-radius: 99px; transition: width .5s; }
.bz-cat-count { font-weight: 700; color: var(--bz-ink); text-align: right; font-size: 12px; }

/* distribution */
.bz-dist-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.bz-dist-row { display: grid; grid-template-columns: 40px 1fr 30px; align-items: center; gap: 10px; font-size: 13px; }
.bz-dist-label { color: var(--bz-ink); font-weight: 600; }
.bz-dist-bar-bg { height: 12px; border-radius: 99px; background: var(--bz-line); overflow: hidden; }
.bz-dist-bar-fill { height: 100%; background: linear-gradient(90deg, var(--bz-chili), #F4A261); border-radius: 99px; transition: width .5s; }
.bz-dist-count { font-weight: 700; color: var(--bz-ink); text-align: right; }

/* authors */
.bz-author-list { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.bz-author-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background .12s;
  font-size: 13px;
}
.bz-author-row:hover { background: var(--bz-want-bg); }
.bz-author-rank { font-family: var(--bz-display); color: var(--bz-chili); font-size: 15px; }
.bz-author-name { color: var(--bz-ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-author-count { font-size: 12px; color: var(--bz-muted); font-weight: 600; }

/* extremes */
.bz-extremes-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.bz-extreme {
  padding: 14px;
  background: var(--bz-paper);
  border-radius: var(--bz-radius);
  border: 1px solid var(--bz-line);
  text-align: center;
}
.bz-extreme-icon { font-size: 28px; margin-bottom: 6px; }
.bz-extreme-label { font-size: 11px; color: var(--bz-muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.bz-extreme-title { font-size: 13.5px; font-weight: 600; color: var(--bz-ink); margin: 4px 0; }
.bz-extreme-val { font-family: var(--bz-display); color: var(--bz-tamarind); font-size: 18px; }

/* currently reading with ETA */
.bz-reading-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.bz-reading-item {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bz-paper);
  border: 1px solid var(--bz-line);
  border-radius: var(--bz-radius);
  padding: 12px 14px;
  cursor: pointer;
  font-family: var(--bz-body);
  transition: all .15s;
}
.bz-reading-item:hover { background: #fff; border-color: var(--bz-leaf); transform: translateY(-1px); box-shadow: var(--bz-shadow-sm); }
.bz-reading-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; gap: 8px; }
.bz-reading-title { font-size: 13.5px; font-weight: 600; color: var(--bz-ink); flex: 1; }
.bz-reading-pct { font-family: var(--bz-display); color: var(--bz-leaf); font-size: 16px; }
.bz-reading-bar { height: 6px; background: var(--bz-line); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.bz-reading-bar-fill { height: 100%; background: var(--bz-leaf); border-radius: 99px; transition: width .35s; }
.bz-reading-meta { display: flex; justify-content: space-between; font-size: 12px; }
.bz-reading-eta {
  background: var(--bz-read-bg);
  color: var(--bz-leaf);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

/* recent quotes */
.bz-quote-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.bz-quote-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: var(--bz-paper);
  border: 1px solid var(--bz-line);
  border-left: 3px solid var(--bz-tamarind);
  border-radius: var(--bz-radius);
  cursor: pointer;
  font-family: var(--bz-body);
  transition: all .15s;
}
.bz-quote-row:hover { background: #fff; transform: translateX(2px); box-shadow: var(--bz-shadow-sm); }
.bz-quote-row-text { font-size: 13.5px; font-style: italic; color: var(--bz-ink); line-height: 1.5; }
.bz-quote-row-foot { margin-top: 4px; font-size: 12px; color: var(--bz-muted); display: flex; gap: 4px; }
.bz-quote-row-book { color: var(--bz-tamarind); font-weight: 600; }

/* ===== responsive ===== */
@media (max-width: 600px) {
  .bz-detail { width: 100%; }
  .bz-page-title { font-size: 22px; }
  .bz-card-goal-num { font-size: 38px; }
  .bz-streak-num { font-size: 40px; }
  .bz-heat-grid { grid-template-rows: repeat(7, 12px); }
  .bz-heat-cell { height: 12px; }
}
