/*
  EDITORIAL — KitobJavon Design System
  ─────────────────────────────────────────
  Warm editorial / independent bookshop aesthetic.
  Paper tones, Manrope + Inter + JetBrains Mono,
  gold accent, sharp corners, ink-dark mode.

  Eski NOVA dizayn: static/style-nova.css da saqlanadi.
*/

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@300;400;500&display=swap');

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:            #f5f0e8;
  --surface:       #ffffff;
  --surface-2:     #ede5d0;
  --text:          #1a1208;
  --text-2:        #3d3020;
  --muted:         #7a6e5e;
  --border:        rgba(26, 18, 8, 0.12);
  --border-2:      rgba(26, 18, 8, 0.22);
  --primary:       #c9973a;
  --primary-h:     #b8882a;
  --primary-faint: rgba(201, 151, 58, 0.10);
  --primary-ring:  rgba(201, 151, 58, 0.25);

  /* semantic */
  --green:  #4a6741; --green-bg:  #eff4ec; --green-text:  #2d4427;
  --red:    #8b3a2a; --red-bg:    #f8efed; --red-text:    #6b2a1a;
  --blue:   #2a4a6a; --blue-bg:   #edf1f5; --blue-text:   #1a3050;
  --yellow: #c9973a; --yellow-bg: #fdf7ee; --yellow-text: #7a5a18;
  --purple: #5a4a7a; --purple-bg: #f2effa; --purple-text: #3a2a5a;
  --slate:  #7a6e5e; --slate-bg:  #f5f2ed; --slate-text:  #3d3020;

  --r:    4px;
  --r-sm: 3px;
  --r-xs: 2px;
  --t:    0.18s ease;

  --sh-sm:      0 1px 4px rgba(26,18,8,0.07), 0 1px 2px rgba(26,18,8,0.04);
  --sh:         0 4px 16px rgba(26,18,8,0.09), 0 2px 4px rgba(26,18,8,0.05);
  --sh-lg:      0 16px 48px rgba(26,18,8,0.13), 0 4px 12px rgba(26,18,8,0.07);
  --sh-primary: 0 4px 18px rgba(201, 151, 58, 0.25);
}

html[data-theme="dark"] {
  --bg:            #141517;
  --surface:       #1e2023;
  --surface-2:     #282a2e;
  --text:          #edeef0;
  --text-2:        #b8bcc4;
  --muted:         #858a94;
  --border:        rgba(255, 255, 255, 0.10);
  --border-2:      rgba(255, 255, 255, 0.18);
  --primary:       #e8b84d;
  --primary-h:     #f0c660;
  --primary-faint: rgba(232, 184, 77, 0.14);
  --primary-ring:  rgba(232, 184, 77, 0.30);

  --green:  #5cb870; --green-bg:  #152418; --green-text:  #7dd694;
  --red:    #e06050; --red-bg:    #2a1210; --red-text:    #f28a7a;
  --blue:   #5a8abf; --blue-bg:   #101c2a; --blue-text:   #88b4e0;
  --yellow: #e8b84d; --yellow-bg: #1c1608; --yellow-text: #f0d080;
  --purple: #9080c0; --purple-bg: #1a1628; --purple-text: #b8a8e0;
  --slate:  #858a94; --slate-bg:  #1a1c20; --slate-text:  #b0b4bc;

  --sh-sm:      0 1px 4px rgba(0,0,0,0.40);
  --sh:         0 4px 16px rgba(0,0,0,0.50);
  --sh-lg:      0 16px 48px rgba(0,0,0,0.65);
  --sh-primary: 0 4px 18px rgba(232, 184, 77, 0.25);
}

/* ── Smooth theme transitions ─────────────────────────────────────────── */
html {
  transition: background-color 0.22s, color 0.22s;
  overflow-x: hidden;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.70;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

h1, h2, h3, h4, h5, .heading {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

html[data-theme="dark"] .topbar {
  background: var(--bg);
}

.logo {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span { color: var(--primary); }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.topbar-nav a {
  text-decoration: none;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 0;
  transition: color var(--t), background var(--t);
  position: relative;
}

.topbar-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 10px; right: 100%;
  height: 1px;
  background: var(--primary);
  transition: right 0.3s ease;
}

.topbar-nav a:hover { color: var(--text); }
.topbar-nav a:hover::after { right: 10px; }

.nav-logout:hover {
  color: var(--red-text) !important;
  background: var(--red-bg) !important;
}

.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--border-2);
  margin: 0 8px;
  flex-shrink: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 400;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--border-2);
  color: var(--text) !important;
  background: var(--surface);
  transition: border-color var(--t), background var(--t);
}

.nav-btn:hover {
  border-color: var(--text);
  background: var(--surface-2);
}

.nav-btn-filled {
  background: var(--text) !important;
  color: var(--bg) !important;
  border-color: var(--text) !important;
}

.nav-btn-filled:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--text) !important;
}

/* ── Hamburger button ────────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 102;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
  display: block;
}
.hamburger--active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger--active span:nth-child(2) { opacity: 0; }
.hamburger--active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .hamburger { display: flex; }

  .topbar-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 0;
    overflow-y: auto;
    z-index: 101;
    border-top: 1px solid var(--border);
  }
  .topbar-nav--open { display: flex; }

  .topbar-nav a {
    width: 100%;
    padding: 12px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
  }
  .topbar-nav a::after { display: none; }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 8px 0;
  }
  .nav-btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
}

/* ── Theme toggle ─────────────────────────────────────────────────────── */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  padding: 6px 10px;
  line-height: 1;
  color: var(--text);
  transition: border-color var(--t), background var(--t);
  font-family: 'JetBrains Mono', monospace;
}

.theme-toggle:hover {
  border-color: var(--text);
  background: var(--surface-2);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 44px 32px;
  width: 100%;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.page-header h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 11px 24px;
  border-radius: 0;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.5;
  white-space: nowrap;
  transition: background var(--t), transform var(--t);
}

.btn:hover {
  background: var(--primary);
  color: var(--text);
  transform: translateY(-1px);
}

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

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
  color: var(--muted);
  transition: color var(--t);
}

.icon-btn:hover { color: var(--text); }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form {
  max-width: 480px;
  background: var(--surface);
  padding: 36px;
  border-radius: 0;
  border: 1px solid var(--border-2);
  box-shadow: var(--sh);
}

.form-title {
  font-family: 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.form p { margin-bottom: 18px; }

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 16px;
}
.form-hint {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Field wrapper ─── */
.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
}

.field-label {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.field-wrap--error input,
.field-wrap--error textarea,
.field-wrap--error select {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 2px rgba(139, 58, 42, 0.14) !important;
}

.field-err {
  font-size: 12.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--red-text);
  background: var(--red-bg);
  border-radius: 0;
  padding: 5px 9px;
  display: block;
}

.field-help {
  font-size: 13px;
  color: var(--muted);
  display: block;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
}

.auth-alert {
  background: var(--red-bg);
  color: var(--red-text);
  border: 1px solid rgba(139, 58, 42, 0.30);
  border-radius: 0;
  padding: 10px 13px;
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.form label {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 0.65rem;
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
label.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
}
label.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}
label.checkbox-row span { line-height: 1; }

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-2);
  border-radius: 0;
  font-size: 17px;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-ring);
  background: var(--surface);
}

.form textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.65;
}

.form button { margin-top: 10px; }

.auth-page {
  display: flex;
  justify-content: center;
  padding-top: 44px;
}

.auth-separator {
  max-width: 480px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-2);
}

.auth-footer {
  max-width: 480px;
  width: 100%;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  margin-top: 20px;
  font-family: 'Inter', sans-serif;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── Bookshelf grid ─────────────────────────────────────────────────────── */
.bookshelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 2px;
}

/* ── Book card ─────────────────────────────────────────────────────────── */
.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh);
  border-color: var(--border-2);
  z-index: 2;
}

.book-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}

.no-cover {
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  border-bottom: 1px solid var(--border);
}

.book-card:nth-child(5n+1) .no-cover { background: linear-gradient(160deg, #8b3a2a 0%, #4a1a0a 100%); }
.book-card:nth-child(5n+2) .no-cover { background: linear-gradient(160deg, #4a6741 0%, #1a3a18 100%); }
.book-card:nth-child(5n+3) .no-cover { background: linear-gradient(160deg, #2a4a6a 0%, #0a1a2a 100%); }
.book-card:nth-child(5n+4) .no-cover { background: linear-gradient(160deg, #5a4a7a 0%, #2a1a4a 100%); }
.book-card:nth-child(5n+5) .no-cover { background: linear-gradient(160deg, #c9973a 0%, #7a5a1a 100%); }

.book-info { padding: 16px; }

.book-info h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.30;
}

.book-info p {
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.62rem;
  border-radius: 0;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.badge.owned    { color: var(--green-text);  background: var(--green-bg); }
.badge.selling  { color: var(--red-text);    background: var(--red-bg); }
.badge.finished { color: var(--blue-text);   background: var(--blue-bg); }
.badge.seeking  { color: var(--yellow-text); background: var(--yellow-bg); }
.badge.public   { color: var(--purple-text); background: var(--purple-bg); }
.badge.private  { color: var(--slate-text);  background: var(--slate-bg); }

/* ── Dashboard card ─────────────────────────────────────────────────────── */
.dashboard-card { display: flex; flex-direction: column; }

.book-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.dashboard-card img,
.dashboard-card .no-cover { height: 240px; }

.dashboard-card .book-info { padding: 14px 14px 8px; }

.book-footer {
  margin-top: auto;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-2);
}

.book-status { display: flex; gap: 5px; flex-wrap: wrap; }

.book-actions-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.book-actions-bottom a,
.book-actions-bottom button {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: color var(--t), background var(--t);
  text-decoration: none;
  font-family: inherit;
}

.book-actions-bottom a:hover,
.book-actions-bottom button:hover {
  color: var(--text);
  background: var(--primary-faint);
}

/* ── Book actions overlay ─────────────────────────────────────────────── */
.book-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--t);
}

.book-card:hover .book-actions { opacity: 1; }

.book-actions button,
.book-actions a {
  background: rgba(245, 240, 232, 0.92);
  border: 1px solid var(--border-2);
  border-radius: 0;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  transition: background var(--t), border-color var(--t);
}

.book-actions button:hover,
.book-actions a:hover {
  background: var(--surface);
  border-color: var(--text);
}

html[data-theme="dark"] .book-actions button,
html[data-theme="dark"] .book-actions a {
  background: rgba(30, 32, 35, 0.92);
}

/* ── Explore grid ─────────────────────────────────────────────────────── */
.explore-header { margin-bottom: 28px; }

.explore-header h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(162px, 1fr));
  gap: 2px;
}

.explore-card {
  position: relative;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 2 / 3;
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 0;
  box-shadow: none;
  transition: transform var(--t), box-shadow var(--t);
}

.explore-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh);
  z-index: 2;
}

.explore-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.explore-card:hover img { transform: scale(1.05); }

.explore-no-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.explore-card:nth-child(5n+1) .explore-no-cover { background: linear-gradient(160deg, #8b3a2a, #4a1a0a); }
.explore-card:nth-child(5n+2) .explore-no-cover { background: linear-gradient(160deg, #4a6741, #1a3a18); }
.explore-card:nth-child(5n+3) .explore-no-cover { background: linear-gradient(160deg, #2a4a6a, #0a1a2a); }
.explore-card:nth-child(5n+4) .explore-no-cover { background: linear-gradient(160deg, #5a4a7a, #2a1a4a); }
.explore-card:nth-child(5n+5) .explore-no-cover { background: linear-gradient(160deg, #c9973a, #7a5a1a); }

.explore-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 18, 8, 0.88) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.22s ease;
  display: flex;
  align-items: flex-end;
}

.explore-card:hover .explore-overlay { opacity: 1; }

.explore-meta {
  padding: 14px;
  color: #f5f0e8;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.explore-title-text {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.explore-meta .badge {
  font-size: 0.60rem;
  padding: 1px 6px;
  background: rgba(245, 240, 232, 0.18) !important;
  color: #f5f0e8 !important;
}

/* ── Public book detail ─────────────────────────────────────────────── */
.public-book {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  padding: 36px;
  border-radius: 0;
  border: 1px solid var(--border-2);
  box-shadow: var(--sh);
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.public-book img {
  width: 200px;
  border-radius: 0;
  border: 1px solid var(--border-2);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: inset -4px 0 8px rgba(0,0,0,0.15);
}

.public-book-content { flex: 1; min-width: 0; }

.public-book-content h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.public-book-content .book-author {
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
  font-family: 'Inter', sans-serif;
  margin-bottom: 16px;
}

.public-book .note {
  margin-top: 20px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
  padding: 16px 18px;
  background: var(--primary-faint);
  border-radius: 0;
  border-left: 3px solid var(--primary);
  font-family: 'Inter', sans-serif;
}

.public-book .owner {
  margin-top: 26px;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stats-title {
  font-family: 'Manrope', sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px;
}

.stat-card {
  background: var(--surface);
  padding: 24px 22px 20px;
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  transition: transform var(--t), box-shadow var(--t);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh);
}

.stat-card h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.stat-card strong {
  font-family: 'Manrope', sans-serif;
  font-size: 48px;
  font-weight: 900;
  display: block;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--primary);
}

.stat-card .change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 0;
  letter-spacing: 0.08em;
}

.change.up   { color: var(--green-text); background: var(--green-bg); }
.change.down { color: var(--red-text);   background: var(--red-bg); }

/* ── Book form ─────────────────────────────────────────────────────────── */
.book-form-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.book-form-card {
  background: var(--surface);
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.cover-card {
  background: var(--surface);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.book-form-title {
  font-family: 'Manrope', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.book-form-card .form {
  box-shadow: none;
  padding: 0;
  border: none;
  background: transparent;
  max-width: none;
}

.book-form-card button[type="submit"] {
  margin-top: 22px;
  width: 100%;
  font-size: 0.72rem;
  padding: 14px;
  justify-content: center;
}

.paste-zone {
  border: 1px dashed var(--border-2);
  border-radius: 0;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t), background var(--t);
}

.paste-zone:hover,
.paste-zone:focus {
  border-color: var(--primary);
  background: var(--primary-faint);
}

.paste-zone-icon { font-size: 36px; margin-bottom: 12px; }

.paste-zone-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.paste-zone-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  font-family: 'Inter', sans-serif;
}

.cover-preview-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.cover-preview-wrap img {
  width: 160px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid var(--border-2);
  box-shadow: inset -4px 0 8px rgba(0,0,0,0.15);
}

.remove-cover-btn {
  background: var(--red-bg);
  color: var(--red-text);
  border: 1px solid var(--red-text);
  border-radius: 0;
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  transition: background var(--t), color var(--t);
}

.remove-cover-btn:hover { background: var(--red); color: var(--bg); }

/* ── Public profile ─────────────────────────────────────────────────── */
.public-profile-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.public-profile-header h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.public-profile-header p {
  color: var(--muted);
  max-width: 520px;
  font-size: 16px;
  line-height: 1.7;
  font-family: 'Inter', sans-serif;
  font-style: italic;
}

/* ── Follow stats on public profile ──────────────────────────────── */
.pub-follow-stats {
  display: flex;
  gap: 20px;
  margin: 10px 0 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}
.pub-follow-stats strong {
  color: var(--text);
  font-size: 15px;
  margin-right: 3px;
}

/* ── Follow button ────────────────────────────────────────────────── */
.btn-follow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text);
  color: var(--bg);
  border: 1.5px solid var(--text);
  padding: 9px 20px;
  border-radius: 0;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.btn-follow:hover {
  background: transparent;
  color: var(--text);
}
.btn-follow--active {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-follow--active:hover {
  background: var(--primary);
  color: var(--bg);
}
.btn--sm {
  padding: 6px 14px;
  font-size: 11px;
}

/* ── Following feed layout ────────────────────────────────────────── */
.feed-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 800px) {
  .feed-layout { grid-template-columns: 1fr; }
  .feed-sidebar { order: -1; }
}

.feed-search-box { margin-bottom: 24px; }
.feed-search-form { display: flex; gap: 8px; }
.feed-search-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  border-radius: 0;
  outline: none;
  transition: border-color var(--t);
}
.feed-search-input:focus { border-color: var(--primary); }

.feed-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.feed-user-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.feed-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.feed-user-info { display: flex; flex-direction: column; gap: 2px; }
.feed-user-info strong { font-size: 15px; font-family: 'Inter', sans-serif; }
.feed-user-slug { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.feed-user-actions { display: flex; gap: 8px; }

.feed-user-private {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.feed-book-owner {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* ── Feed sidebar ─────────────────────────────────────────────────── */
.feed-sidebar {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 20px;
}
.feed-sidebar-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.feed-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.feed-stat strong { font-size: 22px; font-family: 'Manrope', sans-serif; }
.feed-stat span { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.feed-sidebar-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.feed-following-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.feed-following-item a {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: color var(--t);
}
.feed-following-item a:hover { color: var(--primary); }

/* ── Profile settings ─────────────────────────────────────────────── */
.settings-section {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color var(--t);
  box-shadow: none;
}

.settings-section:hover {
  border-color: var(--text);
}

.settings-section p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  font-family: 'Inter', sans-serif;
}

.settings-section a {
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 18px;
  border: 1px solid var(--border-2);
  border-radius: 0;
  transition: background var(--t), color var(--t), border-color var(--t);
}

.settings-section a:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.empty-state-icon { font-size: 56px; margin-bottom: 18px; display: block; }

.empty-state p {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 24px;
}

/* ── Book detail ─────────────────────────────────────────────────────── */
.bd-back { margin-bottom: 24px; }

.bd-back-link {
  color: var(--muted);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--t);
  padding: 4px 0;
}

.bd-back-link:hover { color: var(--text); }

.bd-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
  align-items: start;
}

.bd-info-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bd-cover {
  width: 100%;
  border-radius: 0;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: inset -4px 0 10px rgba(0,0,0,0.12), var(--sh);
}

.bd-no-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--surface-2), var(--primary-faint));
  border: 1px solid var(--border);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  box-shadow: var(--sh);
}

.bd-meta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bd-title {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.bd-author {
  font-size: 16px;
  color: var(--muted);
  font-style: italic;
  font-family: 'Inter', sans-serif;
}

.bd-note {
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text-2);
  line-height: 1.75;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.bd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ── Book detail: Quotes section ──────────────────────────────────── */
.bd-quotes-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Add quote form */
.bd-quote-form {
  margin-bottom: 20px;
}
.bd-quote-form-inner {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: border-color var(--t);
}
.bd-quote-form-inner:focus-within {
  border-color: var(--primary);
}
.bd-quote-form-icon {
  font-size: 28px;
  color: var(--primary);
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.5;
}
.bd-quote-form-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bd-quote-form-fields textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  min-height: 48px;
}
.bd-quote-form-fields textarea::placeholder {
  color: var(--muted);
  font-style: italic;
}
.bd-quote-form-bottom {
  display: flex;
  gap: 8px;
  align-items: center;
}
.bd-quote-form-bottom input {
  width: 130px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
}
.bd-quote-form-bottom input:focus {
  border-color: var(--primary);
}
.bd-quote-form-bottom input::placeholder {
  color: var(--muted);
}
.bd-quote-form-bottom button {
  padding: 7px 16px;
  background: var(--primary);
  color: var(--bg);
  border: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t);
}
.bd-quote-form-bottom button:hover {
  background: var(--primary-h);
}

/* Quote items */
.bd-quote-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  margin-bottom: 8px;
  transition: border-color var(--t);
}
.bd-quote-item:hover {
  border-left-color: var(--primary-h);
}
.bd-quote-icon {
  font-size: 22px;
  color: var(--primary);
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.4;
}
.bd-quote-body {
  flex: 1;
  min-width: 0;
}
.bd-quote-text {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 8px;
}
.bd-quote-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
.bd-quote-page {
  color: var(--text-2);
}
.bd-quote-del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  padding: 2px 6px;
  transition: color var(--t);
}
.bd-quote-del:hover {
  color: var(--red-text, #c0392b);
}
.bd-quote-empty {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  padding: 12px 0;
}

/* ── Right column ─────────────────────────────────────────────────── */
.bd-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Reading session panel ────────────────────────────────────────── */
.bd-reading-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 28px;
  box-shadow: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bd-reading-panel.is-reading {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-ring);
}

.bd-reading-panel--disabled {
  opacity: 0.7;
}

.bd-on-loan-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  text-align: center;
}

.bd-on-loan-icon { font-size: 40px; line-height: 1; }

.bd-on-loan-text {
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--text-2);
  line-height: 1.6;
}

.bd-reading-panel-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 18px;
}

/* Timer display */
.bd-timer-display {
  font-family: 'Manrope', sans-serif;
  font-size: 60px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--border-2);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  margin: 0 0 22px;
  transition: color 0.3s ease;
}

.bd-reading-panel.is-reading .bd-timer-display {
  color: var(--primary);
}

/* Controls */
.bd-idle-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.bd-start-btn {
  font-size: 0.72rem;
  padding: 13px 36px;
}

.bd-active-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.bd-stop-btn {
  background: var(--red);
  border: none;
  box-shadow: none;
  font-size: 0.72rem;
  padding: 13px 36px;
}

.bd-stop-btn:hover {
  background: #6b2a1a;
  color: var(--bg);
  box-shadow: none;
}

/* Session result */
.bd-session-result {
  text-align: center;
  padding: 8px 0;
  animation: fade-up 0.3s ease;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bd-result-icon { font-size: 30px; margin-bottom: 8px; }

.bd-result-time {
  font-family: 'Manrope', sans-serif;
  font-size: 42px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.04em;
}

.bd-result-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.bd-result-again {
  margin-top: 16px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
  box-shadow: none;
  padding: 9px 22px;
  font-size: 0.68rem;
}

.bd-result-again:hover {
  background: var(--surface-2);
  border-color: var(--text);
  box-shadow: none;
  transform: none;
  color: var(--text);
}

/* ── Mic section ──────────────────────────────────────────────────── */
.bd-mic-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.bd-mic-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* ── Audio panel ──────────────────────────────────────────────────── */
.bd-audio-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 22px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bd-audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.bd-audio-header h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.bd-audio-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: var(--primary-faint);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 0;
}

/* ── Mic button ─────────────────────────────────────────────────────── */
.mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mic-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.mic-ring::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
  pointer-events: none;
}

.mic-ring.pulsing::before {
  border-color: rgba(139, 58, 42, 0.35);
  animation: ring-pulse 1.4s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.22); opacity: 0; }
}

.mic-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface);
  font-size: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh);
  line-height: 1;
  padding: 0;
  user-select: none;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t), background var(--t);
}

.mic-btn:hover {
  transform: scale(1.06);
  box-shadow: var(--sh-lg);
  border-color: var(--primary);
}

.mic-btn:active { transform: scale(0.97); }

.mic-btn.mic-blocked {
  border-color: var(--red);
  opacity: 0.48;
  cursor: not-allowed;
}

.mic-btn.mic-blocked:hover {
  transform: none;
  border-color: var(--red);
  box-shadow: var(--sh);
}

.perm-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--red-bg);
  border: 1px solid var(--red-text);
  border-radius: 0;
  padding: 14px 16px;
  width: 100%;
}

.perm-banner-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }

.perm-banner-body strong {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--red-text);
  margin-bottom: 4px;
}

.perm-banner-body p {
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--red-text);
  opacity: 0.85;
  line-height: 1.5;
}

.mic-btn.recording {
  background: var(--red);
  border-color: var(--red);
  animation: mic-pulse 1.4s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(139, 58, 42, 0.45); }
  50%       { box-shadow: 0 0 0 18px rgba(139, 58, 42, 0); }
}

.mic-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
}

.mic-timer {
  font-variant-numeric: tabular-nums;
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--red);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mic-timer.visible { opacity: 1; }

/* ── Audio list ─────────────────────────────────────────────────────── */
.audio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slide-in 0.24s ease;
  transition: border-color var(--t);
}

.audio-item:hover { border-color: var(--border-2); }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.audio-player {
  width: 100%;
  height: 36px;
  accent-color: var(--primary);
}

.audio-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.audio-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.audio-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 7px;
  border-radius: 0;
  color: var(--muted);
  line-height: 1;
  transition: background var(--t), color var(--t);
}

.audio-delete-btn:hover {
  background: var(--red-bg);
  color: var(--red-text);
}

.audio-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-style: italic;
  border: 1px dashed var(--border-2);
  border-radius: 0;
  background: var(--surface-2);
}

/* ── Timer page (standalone) ─────────────────────────────────────── */
.timer-book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 2px;
  margin-bottom: 32px;
}

.timer-book-option {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  padding: 0;
  text-align: left;
  overflow: hidden;
  box-shadow: none;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  display: flex;
  flex-direction: column;
  font-family: inherit;
}

.timer-book-option:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh);
  border-color: var(--border-2);
}

.timer-book-option.selected {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: 0 0 0 2px var(--primary-ring);
}

.timer-book-option img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}

.timer-no-cover {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  border-bottom: 1px solid var(--border);
}

.timer-book-option:nth-child(5n+1) .timer-no-cover { background: linear-gradient(160deg, #8b3a2a, #4a1a0a); }
.timer-book-option:nth-child(5n+2) .timer-no-cover { background: linear-gradient(160deg, #4a6741, #1a3a18); }
.timer-book-option:nth-child(5n+3) .timer-no-cover { background: linear-gradient(160deg, #2a4a6a, #0a1a2a); }
.timer-book-option:nth-child(5n+4) .timer-no-cover { background: linear-gradient(160deg, #5a4a7a, #2a1a4a); }
.timer-book-option:nth-child(5n+5) .timer-no-cover { background: linear-gradient(160deg, #c9973a, #7a5a1a); }

.timer-book-label {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
  line-height: 1.35;
  color: var(--text);
}

.timer-start-area {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  flex-wrap: wrap;
}

.timer-selected-label {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-active-wrap,
.timer-result-wrap {
  max-width: 500px;
  margin: 48px auto;
  text-align: center;
  padding: 52px 40px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 0;
  box-shadow: var(--sh-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.timer-active-book-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.timer-big-display {
  font-family: 'Manrope', sans-serif;
  font-size: 80px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.timer-hint {
  font-size: 15px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-style: italic;
}

.timer-stop-btn {
  background: var(--red);
  border: none;
  box-shadow: none;
}

.timer-stop-btn:hover {
  background: #6b2a1a;
  box-shadow: none;
}

.timer-result-icon { font-size: 56px; }

.timer-result-title {
  font-family: 'Manrope', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.timer-result-duration {
  font-family: 'Manrope', sans-serif;
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--primary);
  line-height: 1;
}

.timer-result-sub {
  font-size: 16px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-style: italic;
}

/* ── Nav: pending badge ─────────────────────────────────────────────────── */
.nav-shares { position: relative; }

.pending-badge {
  position: absolute;
  top: 0; right: 0;
  transform: translate(40%, -30%);
  background: var(--red);
  color: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  font-weight: 400;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}

/* ── Dashboard: shares banner ───────────────────────────────────────────── */
.dashboard-shares-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--primary-faint);
  border: 1px solid var(--primary);
  border-radius: 0;
  text-decoration: none;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 28px;
  transition: background var(--t), border-color var(--t);
}

.dashboard-shares-banner:hover {
  background: rgba(201, 151, 58, 0.18);
  border-color: var(--primary-h);
}

.dashboard-shares-banner-arrow { margin-left: auto; font-size: 16px; opacity: 0.7; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .topbar { padding: 0 20px; height: 56px; }

  .container { padding: 28px 20px; }

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

  .bd-info-col {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
    align-items: start;
  }

  .book-form-wrapper {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 600px) {
  .topbar { padding: 0 16px; }

  .bd-info-col {
    grid-template-columns: 1fr;
  }

  .bd-no-cover {
    max-width: 200px;
    margin: 0 auto;
  }

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

  .public-book {
    flex-direction: column;
  }

  .public-book img { width: 100%; max-width: 220px; }

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

/* ── Badge: share type / status ─────────────────────────────────────────── */
.badge-share {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 0;
  white-space: nowrap;
}

.badge-share.gift       { color: var(--purple-text); background: var(--purple-bg); }
.badge-share.loan       { color: var(--blue-text);   background: var(--blue-bg); }
.badge-share.loaned-out { color: var(--yellow-text); background: var(--yellow-bg); }
.badge-share.return-req { color: var(--yellow-text); background: var(--yellow-bg); }

.book-loan-from {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.06em;
}

/* ── Share status pill ──────────────────────────────────────────────────── */
.share-status-pill {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 2px 8px;
  border-radius: 0;
  white-space: nowrap;
}

.share-status-pill.pending    { color: var(--yellow-text); background: var(--yellow-bg); }
.share-status-pill.accepted   { color: var(--green-text);  background: var(--green-bg); }
.share-status-pill.declined   { color: var(--red-text);    background: var(--red-bg); }
.share-status-pill.return_req { color: var(--yellow-text); background: var(--yellow-bg); }
.share-status-pill.returned   { color: var(--slate-text);  background: var(--slate-bg); }

/* ── Shares page ────────────────────────────────────────────────────────── */
.shares-section { margin-bottom: 48px; }

.shares-section-title {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.share-cards { display: flex; flex-direction: column; gap: 2px; }

.share-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-2);
  border-radius: 0;
  padding: 16px 20px;
  box-shadow: none;
  transition: border-color var(--t);
}

.share-card:hover { border-color: var(--border-2); }
.share-card--incoming { border-left-color: var(--primary); }
.share-card--loan     { border-left-color: var(--blue); }

.share-card-cover {
  width: 56px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: inset -2px 0 5px rgba(0,0,0,0.15);
}

.share-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.share-card-no-cover {
  width: 100%;
  height: 100%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border-radius: 0;
}

.share-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.share-card-type { margin: 0; }

.share-card-book {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-book-link { color: var(--primary); text-decoration: none; }
.share-book-link:hover { text-decoration: underline; }

.share-card-author {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin: 0;
}
.share-card-from {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin: 0;
}
.share-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.share-card-message {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-2);
  font-style: italic;
  background: var(--surface-2);
  padding: 6px 10px;
  border-radius: 0;
  margin: 4px 0 0;
  border-left: 2px solid var(--border-2);
}

.share-card-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 2px 0 0;
}

.share-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}

/* Share action buttons */
.share-accept-btn {
  background: var(--green) !important;
  padding: 8px 16px !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.10em !important;
}
.share-accept-btn:hover { background: var(--green-text) !important; color: var(--bg) !important; }

.share-decline-btn {
  background: none !important;
  color: var(--red-text) !important;
  border: 1px solid var(--red) !important;
  box-shadow: none !important;
  padding: 7px 15px !important;
  font-size: 0.68rem !important;
}
.share-decline-btn:hover { background: var(--red-bg) !important; }

.share-return-btn {
  background: none !important;
  color: var(--text-2) !important;
  border: 1px solid var(--border-2) !important;
  box-shadow: none !important;
  padding: 7px 15px !important;
  font-size: 0.68rem !important;
}
.share-return-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: var(--primary-faint) !important;
}

/* ── Share history ──────────────────────────────────────────────────────── */
.share-history-list { display: flex; flex-direction: column; gap: 2px; }

.share-history-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 13px;
}

.share-history-book {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
}

.share-history-book span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.share-history-thumb {
  width: 32px;
  height: 40px;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.15);
}

.share-history-no-cover {
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.share-history-to {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-2);
  white-space: nowrap;
}

/* ── Book detail: share panel ───────────────────────────────────────────── */
.bd-share-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: none;
}

.bd-share-panel-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 14px;
}

.bd-share-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.bd-share-open-btn { font-size: 0.68rem !important; padding: 8px 16px !important; }

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-2);
  box-shadow: none;
}
.btn.secondary:hover {
  background: var(--surface-2);
  border-color: var(--text);
}

.bd-share-form { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }

.bd-share-form-title {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.bd-share-input {
  width: 100%;
  padding: 9px 13px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 0;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
  resize: vertical;
}
.bd-share-input::placeholder { color: var(--muted); }
.bd-share-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-ring);
}

.bd-share-form-actions { display: flex; gap: 8px; align-items: center; }
.bd-share-form-actions .btn { font-size: 0.68rem; padding: 8px 16px; }

.bd-share-feedback {
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  border-radius: 0;
}
.bd-share-feedback.success { color: var(--green-text); background: var(--green-bg); }
.bd-share-feedback.error   { color: var(--red-text);   background: var(--red-bg); }

.bd-share-status {
  padding: 12px 16px;
  background: var(--surface-2);
  border-radius: 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bd-confirm-btn { font-size: 0.68rem !important; padding: 6px 14px !important; }

.bd-return-panel {
  background: var(--surface-2);
  border-radius: 0;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bd-return-panel--waiting { justify-content: center; }

.bd-return-panel-hint {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-2);
  margin: 0;
}

.bd-return-btn { font-size: 0.68rem !important; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════════════ */

.landing-hero {
  text-align: center;
  padding: 80px 24px 64px;
  max-width: 760px;
  margin: 0 auto;
}

.landing-hero-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--primary);
  background: var(--primary-faint);
  border: 1px solid var(--primary);
  padding: 5px 14px;
  border-radius: 0;
  margin-bottom: 28px;
}

.landing-hero-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
  margin: 0 0 20px;
}

.landing-hero-accent { color: var(--primary); font-style: italic; }

.landing-hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: 19px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.landing-hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-btn-main {
  font-size: 0.72rem !important;
  padding: 14px 32px !important;
}

.landing-btn-sec {
  font-size: 0.72rem !important;
  padding: 14px 24px !important;
}

/* ── Stat bar ─────────────────────────────────────────────────────── */
.landing-stat-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 0;
  box-shadow: none;
  padding: 28px 40px;
  margin: 0 auto 64px;
  max-width: 540px;
}

.landing-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.landing-stat strong {
  font-family: 'Manrope', sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.landing-stat span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.landing-stat-sep {
  width: 1px;
  height: 40px;
  background: var(--border);
  margin: 0 8px;
  flex-shrink: 0;
}

/* ── Sections ─────────────────────────────────────────────────────── */
.landing-section { margin-bottom: 72px; }

.landing-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.20em;
  color: var(--primary);
  margin: 0 0 10px;
}

.landing-section-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 36px;
}

/* ── Feature cards ────────────────────────────────────────────────── */
.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
}

.landing-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 32px 28px;
  box-shadow: none;
  transition: border-color var(--t), transform var(--t);
}

.landing-feature-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: var(--sh);
}

.landing-feature-icon { font-size: 32px; margin-bottom: 16px; }

.landing-feature-card h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.landing-feature-card p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.70;
  margin: 0;
}

/* ── Who can use ──────────────────────────────────────────────────── */
.landing-who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px;
}

.landing-who-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 28px 20px;
  text-align: center;
  box-shadow: none;
  transition: border-color var(--t), transform var(--t);
}

.landing-who-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: var(--sh);
}

.landing-who-emoji { font-size: 36px; margin-bottom: 12px; }

.landing-who-card h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.landing-who-card p {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

/* ── Steps ────────────────────────────────────────────────────────── */
.landing-steps {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  flex-wrap: wrap;
}

.landing-step {
  flex: 1;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 28px 24px;
  box-shadow: none;
}

.landing-step-num {
  width: 36px;
  height: 36px;
  background: var(--text);
  color: var(--bg);
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.landing-step h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.landing-step p {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.landing-step-arrow {
  font-size: 24px;
  color: var(--muted);
  margin-top: 36px;
  flex-shrink: 0;
}

/* ── CTA section ──────────────────────────────────────────────────── */
.landing-cta {
  text-align: center;
  background: var(--text);
  border: none;
  border-radius: 0;
  padding: 60px 32px;
  margin-bottom: 48px;
}

.landing-cta h2 {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--bg);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.landing-cta p {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: rgba(245,240,232,0.65);
  margin: 0 0 28px;
}

/* ═══════════════════════════════════════════════════════════════════════
   DASHBOARD STATS ROW
   ═══════════════════════════════════════════════════════════════════════ */

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-bottom: 28px;
}

.dash-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: none;
  text-align: center;
}

.dash-stat-icon { font-size: 22px; }

.dash-stat-card strong {
  font-family: 'Manrope', sans-serif;
  font-size: 34px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.dash-stat-card span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ═══════════════════════════════════════════════════════════════════════
   BLOG
   ═══════════════════════════════════════════════════════════════════════ */

.page-header-sub {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
  margin: 4px 0 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
  margin-top: 8px;
}

.blog-card {
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 28px 24px;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t), transform var(--t);
}

.blog-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: var(--sh);
}

.blog-card-emoji { font-size: 36px; flex-shrink: 0; line-height: 1; margin-top: 2px; }

.blog-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.blog-card-title {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
}

.blog-card-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.blog-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: auto;
}

/* Blog detail */
.blog-post-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 64px;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color var(--t);
}

.blog-back-link:hover { color: var(--text); }

.blog-post-header {
  text-align: center;
  margin-bottom: 48px;
}

.blog-post-emoji { font-size: 56px; margin-bottom: 20px; }

.blog-post-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.15;
}

.blog-post-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0 0 16px;
}

.blog-post-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-style: italic;
  color: var(--text-2);
  line-height: 1.75;
  margin: 0;
}

.blog-post-content {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.80;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 44px 52px;
  box-shadow: none;
  margin-bottom: 32px;
}

.blog-post-content h2,
.blog-post-content h3 {
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  margin-top: 2em;
}

.blog-post-content h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.blog-post-content h3 { font-size: 21px; font-weight: 700; }

.blog-post-content p { margin: 0 0 1.2em; }

.blog-post-content ul,
.blog-post-content ol {
  padding-left: 1.4em;
  margin-bottom: 1.2em;
}

.blog-post-content li { margin-bottom: 0.5em; }

.blog-post-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.5em 0;
  padding: 14px 24px;
  background: var(--primary-faint);
  border-radius: 0;
  color: var(--text-2);
  font-style: italic;
}

.blog-post-content a { color: var(--primary); }
.blog-post-content a:hover { text-decoration: underline; }

.blog-post-content code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 0;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', monospace;
}

.blog-post-footer { display: flex; gap: 12px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════════════════════════════════ */

.about-header {
  text-align: center;
  padding: 64px 24px 52px;
  max-width: 700px;
  margin: 0 auto;
}

.about-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.15;
}

.about-lead {
  font-family: 'Inter', sans-serif;
  font-size: 19px;
  font-style: italic;
  color: var(--text-2);
  line-height: 1.75;
  margin: 0;
}

.about-section {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 32px;
  box-shadow: none;
  margin-bottom: 2px;
}

.about-section--highlight {
  border-color: var(--primary);
  background: var(--primary-faint);
}

.about-section-icon { font-size: 36px; flex-shrink: 0; }

.about-section-body h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

.about-section-body p {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.75;
  margin: 0 0 10px;
}

.about-section-body p:last-child { margin-bottom: 0; }

.about-tech-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-tech-list li {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-2);
}

.about-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
  margin-bottom: 32px;
}

.about-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px;
  box-shadow: none;
}

.about-feature-icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }

.about-feature h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.about-feature p {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.about-cta {
  text-align: center;
  padding: 52px 24px;
  margin-bottom: 32px;
  background: var(--text);
  border: none;
  border-radius: 0;
}

.about-cta h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--bg);
  margin: 0 0 20px;
}

/* ═══════════════════════════════════════════════════════════════════════
   CUSTOM ADMIN PANEL
   ═══════════════════════════════════════════════════════════════════════ */

.adm-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  margin: 0;
  padding: 0;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.adm-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.adm-sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-sidebar-logo a {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.adm-sidebar-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  background: var(--primary);
  color: var(--text);
  padding: 2px 7px;
  border-radius: 0;
  text-transform: uppercase;
}

.adm-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adm-nav-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  padding: 12px 8px 4px;
  margin: 0;
}

.adm-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--t), color var(--t);
}

.adm-nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.adm-nav-link--active {
  background: var(--primary-faint);
  color: var(--primary);
}

.adm-nav-icon { font-size: 16px; width: 20px; text-align: center; }

.adm-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.adm-theme-btn {
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 0;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.adm-sidebar-user {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Main area ────────────────────────────────────────────────────── */
.adm-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.adm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.adm-topbar-title {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.adm-content { padding: 28px; flex: 1; }

/* ── Stats ────────────────────────────────────────────────────────── */
.adm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-bottom: 24px;
}

.adm-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: none;
}

.adm-stat-icon { font-size: 32px; flex-shrink: 0; }
.adm-stat-body { display: flex; flex-direction: column; gap: 2px; }

.adm-stat-body strong {
  font-family: 'Manrope', sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.adm-stat-body span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

/* ── Cards ────────────────────────────────────────────────────────── */
.adm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.adm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.adm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.adm-card-header h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.adm-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.adm-card-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 400;
}

/* ── Table ────────────────────────────────────────────────────────── */
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.adm-table--full { width: 100%; }

.adm-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 8px 16px;
  text-align: left;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.adm-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: var(--surface-2); }
.adm-tr--draft td { opacity: 0.6; }

.adm-td-user { display: flex; flex-direction: column; gap: 2px; }
.adm-td-emoji { font-size: 20px; width: 40px; text-align: center; }
.adm-td-actions { display: flex; gap: 4px; align-items: center; }

.adm-muted {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
td.adm-muted { display: table-cell; }
span.adm-muted { display: inline; }
.adm-slug {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.adm-empty {
  text-align: center;
  padding: 28px !important;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-style: italic;
}

.adm-post-emoji { margin-right: 6px; }

/* ── Admin book detail (collapsible) ─────────────────────────── */
.adm-book-detail {
  border-top: 1px solid var(--border);
}
.adm-book-detail:last-child {
  border-bottom: 1px solid var(--border);
}
.adm-book-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.adm-book-summary::-webkit-details-marker { display: none; }
.adm-book-summary::before {
  content: '▶';
  font-size: 10px;
  color: var(--muted);
  margin-right: 8px;
  transition: transform 0.15s;
  flex-shrink: 0;
}
details[open] > .adm-book-summary::before { transform: rotate(90deg); }
.adm-book-summary-left {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.adm-book-summary-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.adm-book-inner {
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 700px) {
  .adm-book-inner { grid-template-columns: 1fr; }
}
.adm-book-section {}
.adm-book-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.adm-table--sm td, .adm-table--sm th {
  padding: 6px 10px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.adm-table--sm td strong {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}
.adm-table--sm audio {
  width: 100%;
  max-width: 100%;
  height: 28px;
  display: block;
}

/* ── Badges ───────────────────────────────────────────────────────── */
.adm-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 0;
  white-space: nowrap;
}

.adm-badge--green  { color: var(--green-text);  background: var(--green-bg); }
.adm-badge--gray   { color: var(--muted);        background: var(--surface-2); border: 1px solid var(--border); }
.adm-badge--blue   { color: var(--blue-text);    background: var(--blue-bg); }

/* ── Toggle button ────────────────────────────────────────────────── */
.adm-toggle-btn {
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 0;
  padding: 3px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}

.adm-toggle-btn--on {
  color: var(--green-text);
  background: var(--green-bg);
  border-color: transparent;
}

/* ── Icon buttons ─────────────────────────────────────────────────── */
.adm-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 0;
  transition: background var(--t);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.adm-icon-btn:hover { background: var(--surface-2); }
.adm-icon-btn--del:hover { background: var(--red-bg); }

/* ── Buttons ──────────────────────────────────────────────────────── */
.adm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t);
}

.adm-btn:hover { background: var(--primary); color: var(--text); }

.adm-btn--sm { font-size: 0.62rem; padding: 5px 12px; }

.adm-btn--ghost {
  background: none;
  color: var(--text-2);
  border: 1px solid var(--border-2);
}

.adm-btn--ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.adm-search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
}
.adm-search-input:focus { border-color: var(--primary); }
.adm-table--kv td:first-child { width: 140px; font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.adm-table--kv td:last-child { font-size: 14px; }

/* ── Messages ─────────────────────────────────────────────────────── */
.adm-messages { padding: 0 28px; margin-top: 16px; }

.adm-message {
  padding: 12px 16px;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 400;
  margin-bottom: 8px;
}

.adm-message--success { color: var(--green-text); background: var(--green-bg); }
.adm-message--error   { color: var(--red-text);   background: var(--red-bg); }
.adm-message--warning { color: var(--yellow-text); background: var(--yellow-bg); }

/* ── Form ─────────────────────────────────────────────────────────── */
.adm-form-wrap { max-width: 860px; }

.adm-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 28px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.adm-form-row { display: flex; gap: 16px; }
.adm-form-row--2 > * { flex: 1; }
.adm-form-row--2 > .adm-field--sm { flex: 0 0 100px; }

.adm-field { display: flex; flex-direction: column; gap: 6px; }

.adm-field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.adm-field-hint {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

.adm-field input[type="text"],
.adm-field textarea {
  width: 100%;
  padding: 9px 13px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
  resize: vertical;
  box-sizing: border-box;
}

.adm-field input[type="text"]:focus,
.adm-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-ring);
}

.adm-field textarea { line-height: 1.65; }

.adm-field-err {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--red-text);
}

.adm-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.adm-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}

.adm-form-btns { display: flex; gap: 8px; }

.adm-preview-link { margin-top: 12px; font-size: 14px; }
.adm-preview-link a { color: var(--primary); font-weight: 400; }

/* ── Admin responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .adm-stats { grid-template-columns: repeat(2, 1fr); }
  .adm-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .adm-sidebar { width: 200px; }
  .adm-main { margin-left: 200px; }
  .adm-content { padding: 16px; }
  .adm-topbar { padding: 0 16px; }
}

@media (max-width: 600px) {
  .adm-sidebar { display: none; }
  .adm-main { margin-left: 0; }
  .adm-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════════
   LANDING — LIVE ACTIVITY
   ═══════════════════════════════════════════════════════════════════════ */

.landing-activity-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 64px;
}

.landing-activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 28px;
  box-shadow: none;
}

.lac-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lac-header h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lac-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: auto;
}

.lac-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: lac-pulse 2s ease-in-out infinite;
}

@keyframes lac-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.lac-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: var(--green-bg);
  color: var(--green-text);
  padding: 1px 8px;
  border-radius: 0;
}

.lac-today-badge {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-2);
}

.lac-today-badge strong { color: var(--primary); }

.lac-readers { display: flex; flex-direction: column; gap: 10px; }

.lac-reader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 0;
  transition: background var(--t);
}

.lac-reader:hover { background: var(--surface-2); }

.lac-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-faint);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lac-reader-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.lac-reader-info strong {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.lac-reader-info span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lac-dur {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex-shrink: 0;
}
.lac-live {
  color: #3dbe6c;
  font-size: 10px;
  animation: lac-pulse 1.5s ease-in-out infinite;
}
@keyframes lac-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.lac-empty {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  padding: 24px 0;
}

/* Bar chart */
.lac-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding-top: 24px;
}

.lac-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.lac-bar-count {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  min-height: 16px;
  line-height: 1;
}

.lac-bar-track {
  flex: 1;
  width: 100%;
  background: var(--surface-2);
  border-radius: 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.lac-bar-fill {
  width: 100%;
  background: var(--primary);
  border-radius: 0;
  transition: height 0.6s ease;
  min-height: 3px;
}

.lac-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.10em;
  color: var(--muted);
  text-transform: uppercase;
}

.lac-bar-label--today { color: var(--primary); }

@media (max-width: 768px) {
  .landing-activity-row { grid-template-columns: 1fr; }
}

/* ── Site Banner (scrolling marquee) ──────────────────────────────────── */
.site-banner {
  background: var(--text);
  color: var(--bg);
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

@keyframes banner-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

.site-banner-track {
  display: inline-flex;
  align-items: center;
  animation: banner-scroll 18s linear infinite;
}

.site-banner-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 28px;
}

.site-banner-sep {
  font-size: 10px;
  opacity: 0.5;
  color: var(--primary);
}

/* ── Admin link in topbar ─────────────────────────────────────────────── */
.nav-admin-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem !important;
  letter-spacing: 0.10em !important;
  text-transform: uppercase;
  font-weight: 400 !important;
  color: var(--primary) !important;
  background: var(--primary-faint);
  border: 1px solid var(--primary) !important;
  border-radius: 0 !important;
  padding: 5px 10px !important;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-admin-link:hover {
  background: var(--primary) !important;
  color: var(--text) !important;
}

/* ── Site Footer ───────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer-brand { display: flex; align-items: center; gap: 12px; }

.site-footer-logo {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.site-footer-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}

.site-footer-links { display: flex; align-items: center; gap: 4px; }

.site-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.site-footer-link:hover {
  background: var(--primary-faint);
  color: var(--text);
}

@media (max-width: 600px) {
  .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer-links { flex-wrap: wrap; }
}

/* ── Admin Settings ────────────────────────────────────────────────────── */
.adm-settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 24px 28px;
  margin-bottom: 2px;
}

.adm-settings-section-title {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ── Docs / User Guide ─────────────────────────────────────────────────── */
.docs-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 64px;
}

.docs-header {
  text-align: center;
  padding: 56px 0 40px;
}

.docs-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 8px 0 12px;
}

.docs-lead {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-style: italic;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.70;
}

.docs-toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px;
  margin-bottom: 48px;
}

.docs-toc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 0;
  text-decoration: none;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 400;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}

.docs-toc-item:hover {
  background: var(--primary-faint);
  color: var(--text);
}

.docs-toc-icon { font-size: 22px; }

.docs-section {
  margin-bottom: 52px;
  scroll-margin-top: 80px;
}

.docs-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.docs-section-icon { font-size: 26px; line-height: 1; }

.docs-section-head h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.docs-section-intro {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  color: var(--text-2);
  margin: 0 0 24px;
  padding-left: 38px;
  line-height: 1.70;
}

.docs-steps { display: flex; flex-direction: column; gap: 2px; }

.docs-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 18px 20px;
}

.docs-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--text);
  color: var(--bg);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.docs-step-body h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.docs-step-body p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.65;
}

.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px;
}

.docs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 18px 20px;
}

.docs-card h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.docs-card p {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.60;
}

.docs-list {
  margin: 4px 0 0;
  padding-left: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
}

.docs-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  background: var(--primary-faint);
  border: 1px solid var(--primary);
  border-radius: 0;
  padding: 14px 16px;
}

.docs-note-icon { font-size: 18px; line-height: 1.4; }

.docs-note p {
  font-family: 'Inter', sans-serif;
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.55;
}

.docs-cta {
  text-align: center;
  margin-top: 56px;
  padding: 44px 32px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 0;
}

.docs-cta h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 20px;
}

/* ── Additional responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .landing-hero-title { font-size: 2.4rem; }
  .landing-section-title { font-size: 1.8rem; }
  .dash-stats-row { grid-template-columns: repeat(2, 1fr); }
  .landing-step-arrow { display: none; }
  .blog-post-content { padding: 28px 24px; }
  .about-section { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
  .landing-hero { padding: 48px 16px 40px; }
  .landing-stat-bar { flex-direction: column; gap: 16px; padding: 20px; }
  .landing-stat-sep { width: 40px; height: 1px; }
  .landing-features { grid-template-columns: 1fr; }
  .landing-who-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-stats-row { grid-template-columns: repeat(2, 1fr); gap: 2px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card { flex-direction: column; gap: 12px; }
  .blog-post-content { padding: 20px 16px; }
  .about-features-grid { grid-template-columns: 1fr; }
  .share-card { grid-template-columns: 48px 1fr; grid-template-rows: 1fr auto; }
  .share-card-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; }
  .share-history-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 6px; }
  .share-history-to { grid-column: 1; }
  .docs-title { font-size: 1.8rem; }
  .docs-toc { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .docs-toc-item { font-size: 0.55rem; padding: 8px 4px; }
  .docs-toc-icon { font-size: 18px; }
  .docs-cards { grid-template-columns: 1fr; }
  .docs-section-intro { padding-left: 0; }
}

/* ═══════════════════════════════════════════════════════════
   ERROR PAGES (404, 500)
═══════════════════════════════════════════════════════════ */

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}
.error-page-inner {
  max-width: 480px;
}
.error-code {
  font-family: 'Manrope', sans-serif;
  font-size: 8rem;
  font-weight: 900;
  font-style: italic;
  color: var(--border-2);
  line-height: 1;
  margin-bottom: 8px;
  user-select: none;
}
.error-title {
  font-family: 'Manrope', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}
.error-desc {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 32px;
  line-height: 1.6;
}
.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   COMPARE PROFILES
═══════════════════════════════════════════════════════════ */

/* Public profile — compare trigger */
.pub-profile-actions { margin-top: 16px; display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.btn-outline { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--text-2); border: 1.5px solid var(--border-2); padding: 9px 20px; border-radius: 0; cursor: pointer; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; line-height: 1.5; transition: border-color var(--t), color var(--t); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.cmp-trigger-btn {}
.cmp-widget { display: none; flex-direction: column; gap: 8px; background: var(--surface); border: 1.5px solid var(--border-2); border-radius: var(--r-sm); padding: 14px 16px; margin-top: 8px; }
.cmp-widget.open { display: flex; }
.cmp-widget-label { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.cmp-widget-row { display: flex; gap: 8px; align-items: center; }
.cmp-slug-input { flex: 1; padding: 8px 12px; border: 1.5px solid var(--border-2); border-radius: var(--r-xs); background: var(--bg); color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 13px; outline: none; }
.cmp-slug-input:focus { border-color: var(--primary); }
.cmp-widget-go { white-space: nowrap; }

/* Hero */
/* ── Compare page (two-column) ──────────────────────────────────── */
.cmp-page { max-width: 900px; margin: 0 auto; }
.cmp-header { margin-bottom: 24px; }
.cmp-header h1 { font-family: 'Manrope', sans-serif; font-size: 24px; font-weight: 700; margin-top: 6px; }
.cmp-back { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); text-decoration: none; }
.cmp-back:hover { color: var(--primary); }

/* Two column heads */
.cmp-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.cmp-col-head { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--border); background: var(--surface); }
.cmp-col--right .cmp-col-head { border-color: var(--primary); }
.cmp-col-head h2 { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 700; margin: 0; }
.cmp-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-2); flex-shrink: 0; }
.cmp-avatar--me { background: var(--primary); color: var(--bg); border-color: var(--primary); }
.cmp-bio { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cmp-me-badge { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 2px 8px; color: var(--primary); border: 1px solid var(--primary); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }

/* Sections */
.cmp-section { margin-bottom: 24px; border: 1px solid var(--border); background: var(--surface); }
.cmp-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

/* Rows — use table for perfect column alignment */
.cmp-rows { display: table; width: 100%; border-collapse: collapse; }
.cmp-row { display: table-row; }
.cmp-val, .cmp-label { display: table-cell; vertical-align: middle; border-bottom: 1px solid var(--border); }
.cmp-row:last-child .cmp-val,
.cmp-row:last-child .cmp-label { border-bottom: none; }
.cmp-val {
  padding: 11px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-2);
  width: 40%;
}
.cmp-row .cmp-val:first-child { text-align: right; }
.cmp-row .cmp-val:last-child { text-align: left; }
.cmp-label {
  padding: 11px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  width: 20%;
  background: var(--surface-2);
}

/* Winner highlight */
.cmp-win {
  color: var(--primary);
  font-weight: 600;
  background: rgba(201, 151, 58, 0.08);
}
html[data-theme="dark"] .cmp-win {
  background: rgba(212, 168, 74, 0.12);
}

/* Book shelves */
.cmp-shelves { display: grid; grid-template-columns: 1fr 1fr; }
.cmp-shelf { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; }
.cmp-shelf:first-child { border-right: 1px solid var(--border); }
.cmp-book { text-decoration: none; color: var(--text); width: 80px; display: flex; flex-direction: column; gap: 4px; }
.cmp-book img { width: 80px; height: 110px; object-fit: cover; border: 1px solid var(--border); }
.cmp-book-nocover { width: 80px; height: 110px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.cmp-book span { font-size: 11px; font-family: 'Inter', sans-serif; line-height: 1.3; color: var(--text-2); }

/* Responsive */
@media (max-width: 600px) {
  .cmp-columns { grid-template-columns: 1fr; }
  .cmp-val { padding: 8px 10px; font-size: 13px; }
  .cmp-label { padding: 8px 6px; font-size: 10px; }
  .cmp-shelves { grid-template-columns: 1fr; }
  .cmp-shelf:first-child { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ═══════════════════════════════════════════════════════════
   SEARCH & FILTER BAR
═══════════════════════════════════════════════════════════ */
.search-filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.search-input {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  outline: none;
}
.search-input:focus { border-color: var(--primary); }
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--primary); }

/* ═══════════════════════════════════════════════════════════
   GOALS
═══════════════════════════════════════════════════════════ */
.goals-section { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.goal-card {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
}
.goal-card.goal-done { border-color: var(--green, #3dbe6c); }
.goal-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.goal-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.goal-value { font-family: 'Inter', sans-serif; font-size: 15px; color: var(--text); font-weight: 600; }
.goal-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.goal-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.4s ease; }
.goal-done .goal-fill { background: var(--green, #3dbe6c); }
.goal-set-row { margin-bottom: 24px; }
.goal-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.goal-form select, .goal-form input[type="number"] {
  padding: 7px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════
   STAR RATING
═══════════════════════════════════════════════════════════ */
.bd-rating-display { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.star-display { color: var(--primary); font-size: 1.1rem; letter-spacing: 2px; }
.rating-text { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.bd-review-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.review-form { display: flex; flex-direction: column; gap: 10px; }
.star-selector { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-selector input { display: none; }
.star-selector label { font-size: 1.6rem; color: var(--border-2); cursor: pointer; transition: color 0.15s; }
.star-selector label:hover,
.star-selector label:hover ~ label,
.star-selector input:checked ~ label { color: var(--primary); }
.review-text {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  resize: vertical;
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATIONS
═══════════════════════════════════════════════════════════ */
.nav-notif { position: relative; }
.notif-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--red-bg, #e74c3c);
  color: #fff;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.notif-list { display: flex; flex-direction: column; gap: 4px; }
.notif-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.notif-unread { border-left: 3px solid var(--primary); background: var(--primary-faint, rgba(201,151,58,0.06)); }
.notif-content { flex: 1; }
.notif-content strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.notif-content p { font-size: 13px; color: var(--text-2); margin: 2px 0; }
.notif-time { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   LEADERBOARD
═══════════════════════════════════════════════════════════ */
.lb-tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.lb-tab {
  padding: 8px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--surface);
  transition: all var(--t);
}
.lb-tab.active, .lb-tab:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.lb-table { display: flex; flex-direction: column; gap: 3px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--surface);
  border-radius: var(--r-xs);
}
.lb-row:nth-child(odd) { background: var(--surface-2); }
.lb-top3 { border-left: 3px solid var(--primary); }
.lb-rank {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  min-width: 28px;
  text-align: center;
}
.lb-user { flex: 1; font-family: 'Inter', sans-serif; font-size: 16px; color: var(--text); }
.lb-user small { color: var(--muted); font-size: 13px; }
.lb-sessions { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.lb-time { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-2); font-weight: 500; min-width: 70px; text-align: right; }
.lb-actions { display: flex; gap: 6px; }

/* ═══════════════════════════════════════════════════════════
   READING REPORTS
═══════════════════════════════════════════════════════════ */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.report-chart {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 180px;
  padding: 12px 0;
}
.report-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.report-bar-count { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--muted); height: 14px; }
.report-bar-track { flex: 1; width: 100%; max-width: 24px; background: var(--surface-2); border-radius: 2px; position: relative; height: 120px; }
.report-bar-fill { position: absolute; bottom: 0; width: 100%; background: var(--primary); border-radius: 2px; transition: height 0.3s ease; }
.report-bar-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   USER SEARCH RESULTS
═══════════════════════════════════════════════════════════ */
.user-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t);
}
.user-card:hover { border-color: var(--primary); }
.user-card strong { display: block; font-size: 14px; }
.user-card .muted { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   RECOMMENDATIONS
═══════════════════════════════════════════════════════════ */
.rec-list { display: flex; flex-direction: column; gap: 8px; }
.rec-card {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.rec-from { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--primary); margin-bottom: 4px; }
.rec-book strong { font-size: 16px; }
.rec-book span { font-size: 13px; color: var(--muted); margin-left: 8px; }
.rec-msg { font-size: 14px; color: var(--text-2); margin-top: 6px; font-style: italic; }
.rec-time { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); margin-top: 6px; display: block; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE ADDITIONS
═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .search-filter-bar { flex-direction: column; }
  .search-input, .filter-select { width: 100%; }
  .lb-row { padding: 10px 12px; gap: 8px; }
  .lb-sessions { display: none; }
  .report-chart { height: 140px; }
  .goal-form { flex-direction: column; align-items: stretch; }
  .goals-section { flex-direction: column; }
  .sitemap-grid { grid-template-columns: 1fr; }
  .sitemap-card { padding: 14px 16px; }
}

/* ═══════════════════════════════════════════════════════════
   SITEMAP PAGE
═══════════════════════════════════════════════════════════ */
.sitemap-page { max-width: 900px; margin: 0 auto; }
.sitemap-hero { margin-bottom: 36px; }
.sitemap-title {
  font-family: 'Manrope', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.sitemap-sub {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--muted);
}
.sitemap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
.sitemap-group {}
.sitemap-group-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}
.sitemap-group-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
  font-style: italic;
}
.sitemap-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.sitemap-card {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t), transform var(--t);
}
a.sitemap-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.sitemap-card-info {
  opacity: 0.85;
  border-style: dashed;
}
.sitemap-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  line-height: 1.3;
}
.sitemap-card strong {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.sitemap-card p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.sitemap-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.sitemap-footer a { color: var(--primary); }

/* ── Explore: reader count badge ────────────────────────────────── */
.explore-reader-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(26, 18, 8, 0.78);
  color: #f0e8d8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  letter-spacing: 0.04em;
  font-weight: 400;
  padding: 3px 7px;
  border-radius: var(--r-xs);
  z-index: 3;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

html[data-theme="dark"] .explore-reader-count {
  background: rgba(240, 232, 216, 0.18);
  color: #f0e8d8;
}

/* ── Catalog page ────────────────────────────────────────────────── */
.catalog-page {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 64px;
}

.catalog-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 36px;
  align-items: flex-start;
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 600px) {
  .catalog-hero {
    grid-template-columns: 130px 1fr;
    gap: 20px;
  }
}

@media (max-width: 420px) {
  .catalog-hero {
    grid-template-columns: 1fr;
  }
}

.catalog-cover {
  width: 180px;
  aspect-ratio: 2/3;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--sh);
  flex-shrink: 0;
}

.catalog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-no-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #c9973a, #7a5a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
}

.catalog-isbn-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.catalog-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 8px;
}

.catalog-author {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-2);
  margin-bottom: 14px;
}

.catalog-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.catalog-rating-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

.catalog-reader-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.catalog-stat-number {
  font-family: 'Manrope', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.catalog-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-2);
}

/* ── Catalog sections ────────────────────────────────────────────── */
.catalog-section {
  margin-bottom: 48px;
}

/* ── Catalog readers grid ────────────────────────────────────────── */
.catalog-readers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.catalog-reader-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

a.catalog-reader-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}

.catalog-reader-card--private {
  opacity: 0.6;
  cursor: default;
}

.lac-avatar--muted {
  opacity: 0.5;
}

.catalog-reader-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.catalog-reader-info strong {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}

/* ── Catalog reviews ─────────────────────────────────────────────── */
.catalog-reviews {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* ── Catalog also-read section ───────────────────────────────────── */
.catalog-also-read .explore-grid {
  margin-top: 16px;
}

.catalog-also-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
}

/* ══════════════════════════════════════════════════════════════════════
   STREAK, QUOTES, CLUBS, YEARLY REPORT, CATEGORY CHART
   ════════════════════════════════════════════════════════════════════ */

/* ── Daily Share Card ──────────────────────────────────────────────── */
.dc-page { max-width: 500px; margin: 0 auto; padding: 20px 0 60px; }
.dc-header { text-align: center; margin-bottom: 24px; }
.dc-header h2 { font-family: 'Manrope', sans-serif; font-size: 22px; }
.dc-header p { font-size: 14px; color: var(--muted); }

.dc-preview-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.dc-card {
  width: 360px;
  height: 640px;
  background: linear-gradient(160deg, #1a1517 0%, #0f1218 40%, #141820 100%);
  color: #f0f0f2;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

/* Background pattern */
.dc-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(232,184,77,0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(232,184,77,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.dc-card > * { position: relative; z-index: 1; }

/* Top */
.dc-top { display: flex; justify-content: space-between; align-items: center; }
.dc-logo {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #e8b84d;
}
.dc-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
}

/* User */
.dc-user { text-align: center; padding: 8px 0; }
.dc-user-sticker { font-size: 40px; margin-bottom: 6px; }
.dc-user-name {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

/* Main stat */
.dc-main-stat { text-align: center; padding: 16px 0; }
.dc-main-number {
  font-family: 'Manrope', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #e8b84d;
  line-height: 1.2;
}
.dc-main-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-top: 6px;
}

/* Books */
.dc-books {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0;
}
.dc-book-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
}
.dc-book-icon { font-size: 14px; flex-shrink: 0; }
.dc-book-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-book-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #e8b84d;
  font-weight: 500;
  flex-shrink: 0;
}

/* Stats row */
.dc-stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px 0;
}
.dc-stat-item { text-align: center; }
.dc-stat-val {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.dc-stat-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* CTA */
.dc-cta { text-align: center; padding-top: 12px; }
.dc-cta-line {
  width: 40px;
  height: 2px;
  background: #e8b84d;
  margin: 0 auto 12px;
  opacity: 0.5;
}
.dc-cta-text {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #e8b84d;
  letter-spacing: 0.02em;
}
.dc-cta-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
}

/* Actions */
.dc-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dc-empty-note {
  text-align: center;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  color: var(--muted);
}

/* ── Onboarding ────────────────────────────────────────────────────── */
.ob-page { max-width: 720px; margin: 0 auto; padding: 20px 0 60px; }

.ob-welcome { text-align: center; margin-bottom: 36px; }
.ob-emoji { font-size: 56px; margin-bottom: 12px; }
.ob-title {
  font-family: 'Manrope', sans-serif;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
}
.ob-lead {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.ob-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}
.ob-feature {
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.ob-feature-icon { font-size: 26px; margin-bottom: 8px; }
.ob-feature strong {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  margin-bottom: 4px;
}
.ob-feature p {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

.ob-step {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 12px;
  transition: border-color var(--t);
}
.ob-step--done { border-color: var(--green-text, #2d4427); }
.ob-step--final { border-left: 3px solid var(--primary); }

.ob-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.ob-step--done .ob-step-num { background: var(--green-text, #2d4427); }

.ob-step-body { flex: 1; }
.ob-step-body h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
}
.ob-step-body p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 12px;
}
.ob-step-success {
  color: var(--green-text, #2d4427);
  font-weight: 500;
}

.ob-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ob-form input[type="text"],
.ob-form input[type="number"],
.ob-form select {
  flex: 1;
  min-width: 140px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color var(--t);
}
.ob-form input:focus, .ob-form select:focus { border-color: var(--primary); }
.ob-form button { padding: 9px 18px; }

.ob-books-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ob-book-chip {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.ob-btn-finish {
  background: var(--primary);
  color: var(--bg);
  font-size: 13px;
  padding: 11px 24px;
}

.ob-skip { text-align: center; margin-top: 24px; }
.ob-skip-link {
  background: none;
  border: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.ob-skip-link:hover { color: var(--text-2); }

/* ── Public quotes ─────────────────────────────────────────────────── */
.pub-quotes-section { margin-top: 24px; }
.pub-quotes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pub-quote-card {
  border-left: 3px solid var(--primary);
  padding: 14px 18px;
  background: var(--surface);
  transition: border-color var(--t);
}
.pub-quote-card:hover { border-left-color: var(--text); }
.pub-quote-text {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.7;
  margin: 0 0 10px;
  color: var(--text);
}
.pub-quote-meta {
  display: flex;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
.pub-quote-user { color: var(--primary); font-weight: 500; }

/* ── Streak badge ──────────────────────────────────────────────────── */
.dash-stat-card--streak { border: 1.5px solid var(--primary); }
.dash-stat-card--streak strong { color: var(--primary); }

.dash-quick-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-quick-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-2);
  letter-spacing: 0.04em;
  transition: border-color var(--t), color var(--t);
}
.dash-quick-link:hover { border-color: var(--primary); color: var(--primary); }

/* ── Quotes ────────────────────────────────────────────────────────── */
.quote-book-group { margin-bottom: 28px; }
.quote-book-title {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.quote-card {
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--surface);
}
.quote-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  margin: 0 0 8px;
  color: var(--text);
}
.quote-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
.quote-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  padding: 2px 6px;
  transition: color var(--t);
}
.quote-delete:hover { color: var(--red-text, #c0392b); }
.quote-add-form { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.quote-add-form textarea { font-family: 'Inter', sans-serif; font-size: 15px; }

/* ── Clubs ─────────────────────────────────────────────────────────── */
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.club-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--t);
}
.club-card:hover { border-color: var(--primary); }
.club-card--joined { border-left: 3px solid var(--primary); }
.club-card-emoji { font-size: 32px; flex-shrink: 0; }
.club-card-info { display: flex; flex-direction: column; gap: 4px; }
.club-card-info strong { font-family: 'Manrope', sans-serif; font-size: 16px; }
.club-card-meta { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.club-card-current { font-family: 'Inter', sans-serif; font-size: 13px; color: var(--primary); }
.club-card-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 2px 8px;
  color: var(--primary);
  border: 1px solid var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.club-create-box { margin-bottom: 20px; }
.club-create-form { padding: 16px; border: 1px solid var(--border); margin-top: 12px; background: var(--surface); }

.club-detail-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.club-detail-emoji { font-size: 52px; }
.club-detail-header h2 { font-family: 'Manrope', sans-serif; font-size: 28px; margin-bottom: 6px; }
.club-detail-desc { color: var(--text-2); font-family: 'Inter', sans-serif; font-size: 15px; line-height: 1.6; }
.club-detail-stats { display: flex; gap: 16px; margin-top: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.club-detail-actions { margin-bottom: 24px; }

.club-current-book {
  border: 2px solid var(--primary);
  padding: 20px;
  margin-bottom: 24px;
  background: var(--surface);
}
.club-current-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 6px;
}
.club-current-book h3 { font-family: 'Manrope', sans-serif; font-size: 20px; }
.club-current-isbn { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }

.club-section { margin-bottom: 28px; }
.club-add-book-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.club-add-book-form .form-input { flex: 1; min-width: 120px; }
.form-input--sm { max-width: 120px; }

.club-book-list { display: flex; flex-direction: column; gap: 8px; }
.club-book-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.club-book-item--current { border-color: var(--primary); }
.club-book-info { display: flex; flex-direction: column; gap: 2px; }
.club-book-info strong { font-family: 'Inter', sans-serif; font-size: 15px; }
.club-book-active-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.club-members-list { display: flex; flex-wrap: wrap; gap: 10px; }
.club-member-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.club-member-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
}
.club-member-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Yearly report ─────────────────────────────────────────────────── */
.yr-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.yr-header h2 { font-family: 'Manrope', sans-serif; font-size: 28px; }
.yr-nav { display: flex; gap: 8px; }

.yr-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 28px; }
.yr-stat {
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}
.yr-stat-num { font-family: 'Manrope', sans-serif; font-size: 32px; font-weight: 700; color: var(--primary); }
.yr-stat-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 4px; }

.yr-highlight {
  padding: 20px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  background: var(--surface);
}
.yr-highlight-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 4px; }
.yr-highlight h3 { font-family: 'Manrope', sans-serif; font-size: 20px; }
.yr-highlight-time { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--primary); }

.yr-section { margin-bottom: 28px; }
.yr-chart { display: flex; gap: 6px; align-items: flex-end; height: 180px; }
.yr-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.yr-bar { width: 100%; max-width: 36px; background: var(--primary); min-height: 4px; transition: height 0.3s; }
.yr-bar-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); margin-top: 6px; }

/* ── Report comparison ─────────────────────────────────────────────── */
.report-compare-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.report-compare-card {
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.report-compare-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.report-compare-card strong { font-family: 'Manrope', sans-serif; font-size: 22px; }
.text-green { color: var(--green-text, #27ae60); }
.text-red { color: var(--red-text, #c0392b); }

/* ── Category chart ────────────────────────────────────────────────── */
.cat-chart-row { display: flex; gap: 28px; align-items: center; }
.cat-donut { width: 140px; height: 140px; flex-shrink: 0; }
.cat-donut-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cat-donut-segment { transition: stroke-dasharray 0.3s; }
.cat-legend { display: flex; flex-direction: column; gap: 6px; }
.cat-legend-item { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.cat-legend-dot { width: 10px; height: 10px; flex-shrink: 0; }
.cat-legend-item strong { margin-left: auto; color: var(--primary); }

@media (max-width: 600px) {
  .report-compare-row { grid-template-columns: 1fr; }
  .cat-chart-row { flex-direction: column; }
  .yr-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
