/* FolioForge - Premium Design System v2 */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,300;6..72,400;6..72,500;6..72,600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #FCFCF9;
  --bg-elevated: #FFFFFF;
  --bg-muted: #F5F3EF;
  --bg-warm: #FDF6E3;
  --text: #1A1A18;
  --text-muted: #6B6B68;
  --text-light: #9A9A96;
  --border: #E8E5DF;
  --border-strong: #D4D0C8;
  --accent: #111111;
  --accent-contrast: #FFFFFF;
  --accent-muted: #2A2A28;
  --success: #1A7A4C;
  --warning: #9A6A00;
  --danger: #B42318;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --max-width: 1120px;
  --reading-width: 720px;
  --reading-size: 18px;
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-display: 'Fraunces', 'Instrument Serif', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; font-feature-settings: "liga" 1, "calt" 1; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Typography - Premium */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; font-optical-sizing: auto; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 600; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.4rem); font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.02em; }

a { color: inherit; text-decoration: none; }
a.underline { text-decoration: underline; text-underline-offset: 3px; }

/* Premium Icons */
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 32px; height: 32px; }
.icon svg { width: 100%; height: 100%; }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--reading-width); }
.container--wide { max-width: 1280px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(252,252,249,0.85);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.logo-mark { width: 28px; height: 28px; background: var(--accent); color: var(--accent-contrast); display: grid; place-items: center; border-radius: 8px; font-family: var(--font-sans); font-weight: 700; font-size: 13px; letter-spacing: -0.02em; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-muted); transition: .2s; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover { color: var(--text); background: var(--bg-muted); }
.nav a.active { background: var(--accent); color: var(--accent-contrast); }
@media (max-width: 640px) {
  .site-header .inner { height: 56px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .nav a span { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1;
  cursor: pointer; transition: .18s ease; white-space: nowrap; text-decoration: none;
  letter-spacing: -0.01em;
}
.btn--primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-muted); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--secondary { background: var(--bg-elevated); border-color: var(--border); color: var(--text); }
.btn--secondary:hover { border-color: var(--border-strong); background: var(--bg-muted); }
.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover { color: var(--text); background: var(--bg-muted); }
.btn--small { padding: 8px 14px; font-size: 13px; }
.btn--large { padding: 16px 28px; font-size: 15px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }

/* Cards */
.card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card--hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); transition: .2s; }

/* Inputs */
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elevated); font-family: var(--font-sans); font-size: 14px; color: var(--text);
  transition: .15s; outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.label { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px; letter-spacing: .02em; text-transform: uppercase; }
.hint { font-size: 12px; color: var(--text-light); margin-top: 6px; line-height: 1.4; }
.form-row { display: grid; gap: 16px; }
.form-row--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-row--2 { grid-template-columns: 1fr; } }

/* Badge */
.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.badge--draft { background: #FEF3C7; color: #92400E; }
.badge--published { background: #D1FAE5; color: #065F46; }
.badge--private { background: #E5E7EB; color: #374151; }

/* Landing */
.hero { padding: 80px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 40px 0 24px; } }
.hero h1 { margin: 0 0 16px; }
.hero p.lead { font-size: clamp(16px, 2.2vw, 18px); color: var(--text-muted); line-height: 1.65; margin: 0 0 28px; max-width: 52ch; font-weight: 400; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.book-mock { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 20px; padding: 20px; box-shadow: var(--shadow-lg); transform: rotate(-1deg); }
.book-mock header { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.book-mock .mock-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.book-mock .mock-meta { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-sans); }
.book-mock .mock-line { height: 8px; background: var(--bg-muted); border-radius: 4px; margin: 10px 0; }
.book-mock .mock-line.w-80 { width: 80%; } .mock-line.w-60 { width: 60%; } .mock-line.w-90 { width: 90%; }

.features { padding: 64px 0; border-top: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features-grid { grid-template-columns: 1fr; } }
.feature { padding: 24px; }
.feature h3 { margin: 14px 0 8px; }
.feature p { color: var(--text-muted); font-size: 14px; margin: 0; line-height: 1.6; }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-muted); display: grid; place-items: center; color: var(--text); border: 1px solid var(--border); }
.feature-icon svg { width: 22px; height: 22px; }

.how-it-works { padding: 48px 0 80px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 16px; border-top: 1px solid var(--border); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-display); font-size: 13px; color: var(--text-light); font-weight: 600; letter-spacing: .04em; }
.step h4 { margin: 12px 0 6px; font-family: var(--font-sans); font-weight: 600; font-size: 15px; }
.step p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Upload */
.upload-wrap { max-width: 720px; margin: 48px auto; padding: 0 24px; }
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-elevated);
  padding: 48px 24px; text-align: center; transition: .2s; cursor: pointer;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--bg-muted); }
.dropzone-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: var(--bg-muted); display: grid; place-items: center; border: 1px solid var(--border); color: var(--text-muted); }
.dropzone-icon svg { width: 28px; height: 28px; }
.dropzone h3 { margin: 0 0 8px; }
.dropzone p { margin: 0; color: var(--text-muted); font-size: 14px; }
.file-meta { margin-top: 16px; padding: 12px; background: var(--bg-muted); border-radius: var(--radius-sm); display: none; text-align: left; }
.file-meta.active { display: flex; justify-content: space-between; align-items: center; }
.progress { height: 6px; background: var(--bg-muted); border-radius: 999px; overflow: hidden; margin-top: 16px; display: none; }
.progress.active { display: block; }
.progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width .3s; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin: 16px 0; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert--error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert--success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert--warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert--info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* Editor */
.editor-layout { display: grid; grid-template-columns: 300px 1fr 360px; height: calc(100vh - 64px); overflow: hidden; }
@media (max-width: 1100px) { .editor-layout { grid-template-columns: 280px 1fr; } .editor-preview { display: none; } }
@media (max-width: 720px) {
  .editor-layout { display: flex; flex-direction: column; height: auto; min-height: calc(100vh - 56px); }
  .editor-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--bg-elevated); position: sticky; top: 56px; z-index: 10; }
  .editor-tab { flex: 1; padding: 14px; text-align: center; font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; display: flex; align-items: center; justify-content: center; gap: 6px; }
  .editor-tab.active { border-color: var(--accent); color: var(--text); }
  .editor-panel { display: none; } .editor-panel.active { display: block; }
  .editor-outline, .editor-main, .editor-preview { height: auto; overflow: visible; }
  .editor-main { padding: 16px; }
}
.editor-outline { border-right: 1px solid var(--border); background: var(--bg-elevated); overflow-y: auto; padding: 16px; }
.editor-main { overflow-y: auto; padding: 24px; background: var(--bg); }
.editor-preview { border-left: 1px solid var(--border); background: var(--bg-elevated); overflow-y: auto; padding: 20px; }
.outline-item { padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 4px; }
.outline-item:hover { background: var(--bg-muted); }
.outline-item.active { background: var(--accent); color: var(--accent-contrast); }
.outline-item small { opacity: .7; font-size: 11px; }

.block { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; position: relative; }
.block:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.block-toolbar { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.block-type { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-light); }
.block-actions { margin-left: auto; display: flex; gap: 4px; }
.block-actions button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-elevated); cursor: pointer; display: grid; place-items: center; }
.block-actions button:hover { background: var(--bg-muted); }
.block [contenteditable] { outline: none; min-height: 24px; line-height: 1.7; font-size: 15px; }
.block textarea { width: 100%; border: none; background: transparent; resize: vertical; font-family: inherit; font-size: 15px; line-height: 1.7; outline: none; min-height: 80px; }

/* Reader - Premium & Fixed Font Size */
.reader { background: var(--bg); min-height: 100vh; }
.reader--classic { --reading-font: var(--font-serif); --reading-bg: #FCFCF9; }
.reader--modern { --reading-font: var(--font-sans); --reading-bg: #FFFFFF; }
.reader--editorial { --reading-font: var(--font-serif); --reading-bg: #FDFCF8; }
.reader--warm { --reading-font: var(--font-serif); --reading-bg: #FDF6E3; }
.reader-header { border-bottom: 1px solid var(--border); background: var(--bg-elevated); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.reader-progress { height: 3px; background: var(--accent); width: 0%; transition: width .1s; }
.reader-toolbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; gap: 12px; }
.reader-toolbar-left, .reader-toolbar-right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .reader-toolbar { height: auto; min-height: 56px; padding: 8px 12px; flex-wrap: wrap; }
  .reader-toolbar-right { flex-wrap: wrap; }
  .reader-toolbar .btn--small { padding: 6px 10px; font-size: 12px; }
}
.reader-content { max-width: var(--reading-width); margin: 0 auto; padding: 48px 24px 80px; font-family: var(--reading-font, var(--font-serif)); background: var(--reading-bg, var(--bg)); font-size: var(--reading-size, 18px); line-height: 1.8; color: #1E1E1D; font-weight: 400; letter-spacing: -0.01em; font-optical-sizing: auto; }
@media (max-width: 640px) { .reader-content { padding: 24px 20px 64px; --reading-size: 17px !important; } }
.reader-content h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 8px; line-height: 1.1; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; }
.reader-content .subtitle { font-size: 1.15em; color: var(--text-muted); margin-bottom: 8px; font-family: var(--font-sans); font-weight: 400; line-height: 1.4; }
.reader-content .author { font-size: .9em; color: var(--text-muted); margin-bottom: 32px; font-family: var(--font-sans); }
.reader-content h2 { font-size: 1.6em; margin: 48px 0 16px; padding-top: 16px; border-top: 1px solid var(--border); font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.reader-content h3 { font-size: 1.25em; margin: 32px 0 12px; font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.reader-content h4 { font-size: 1.1em; margin: 24px 0 8px; font-family: var(--font-sans); font-weight: 600; }
.reader-content p { font-size: 1em; line-height: 1.8; margin: 0 0 1.3em; color: inherit; font-weight: 400; }
.reader-content ul, .reader-content ol { margin: 0 0 1.5em 1.2em; padding: 0; font-size: 1em; }
.reader-content li { font-size: 1em; line-height: 1.7; margin-bottom: .6em; }
.reader-content blockquote { border-left: 3px solid var(--accent); padding-left: 20px; margin: 28px 0; font-style: italic; color: var(--text-muted); font-size: 1.05em; line-height: 1.6; font-family: var(--font-serif); }
.reader-content .table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.reader-content table { width: 100%; border-collapse: collapse; font-size: .85em; }
.reader-content th, .reader-content td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.reader-content th { background: var(--bg-muted); font-weight: 600; font-family: var(--font-sans); font-size: .9em; text-transform: uppercase; letter-spacing: .04em; }
.reader-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.reader-content a:hover { text-decoration-thickness: 2px; }

/* Cover - Only on first page */
.reader-cover-hero { margin: 0 0 40px; }
.reader-cover-hero img { width: 100%; max-width: 340px; border-radius: 12px; box-shadow: var(--shadow-lg); display: block; }
.reader-cover-hero--first-only { display: block; }
.reader-cover-hero--hidden { display: none; }
@media (max-width: 640px) {
  .reader-cover-hero img { max-width: 100%; }
}

.reader-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@media (max-width: 640px) {
  .reader-nav { flex-direction: column; gap: 16px; }
  .reader-nav > div { width: 100%; display: flex; justify-content: center; }
  .reader-nav > div:first-child { order: 2; justify-content: space-between; }
  .reader-nav > div:last-child { order: 3; }
}
.reader-toc { position: fixed; inset: 0; z-index: 50; display: none; }
.reader-toc.active { display: block; }
.reader-toc-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); }
.reader-toc-panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(360px, 85vw); background: var(--bg-elevated); overflow-y: auto; padding: 24px; box-shadow: var(--shadow-lg); }
@media (max-width: 640px) { .reader-toc-panel { width: 100vw; } }
.reader-settings { position: fixed; right: 16px; bottom: 16px; z-index: 30; }
.toc-link { display: block; padding: 10px 12px; border-radius: 8px; font-size: 14px; transition: .15s; }
.toc-link:hover { background: var(--bg-muted); }
.toc-link.active { background: var(--bg-muted); font-weight: 600; color: var(--text); }

/* Dashboard */
.dashboard { padding: 32px 0 64px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
@media (max-width: 640px) { .book-grid { grid-template-columns: 1fr; } }
.book-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.book-card-cover { width: 100%; aspect-ratio: 3/4; background: var(--bg-muted); border-radius: var(--radius-sm); overflow: hidden; display: grid; place-items: center; color: var(--text-light); font-size: 12px; border: 1px solid var(--border); }
.book-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card h3 { margin: 0; font-size: 16px; font-family: var(--font-sans); font-weight: 600; line-height: 1.3; }
.book-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.book-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* Empty */
.empty { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.empty h3 { color: var(--text); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 16px; background: var(--bg-muted); display: grid; place-items: center; border: 1px solid var(--border); color: var(--text-light); }
.empty-icon svg { width: 32px; height: 32px; }

/* Utilities */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Responsive preview */
.preview-mobile { max-width: 390px; margin: 0 auto; border: 1px solid var(--border); border-radius: 24px; padding: 12px; background: #111; }
.preview-mobile .preview-inner { background: var(--bg-elevated); border-radius: 16px; overflow: hidden; max-height: 600px; overflow-y: auto; }

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

/* Toast */
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { background: var(--accent); color: var(--accent-contrast); padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-lg); animation: slideUp .3s ease; display: flex; align-items: center; gap: 8px; }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Premium icon set - hide emoji fallback */
.emoji-fallback { display: none; }

/* Responsive helpers */
.hide-mobile { display: inline-flex; }
.show-mobile { display: none; }
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: inline-flex !important; }
  .container { padding: 0 16px; }
  .hero { padding: 24px 0 16px; }
  .hero-grid { gap: 24px; }
  .hero-visual { display: none; }
  .features { padding: 32px 0; }
  .how-it-works { padding: 32px 0 48px; }
  .upload-wrap { margin: 24px auto; padding: 0 16px; }
  .dropzone { padding: 32px 16px; }
  .site-header .inner { height: 56px; }
  .editor-topbar { height: auto; min-height: 48px; padding: 8px 12px; flex-wrap: wrap; gap: 8px; }
  .book-card-actions { gap: 6px; }
  .book-card-actions .btn { padding: 6px 10px; font-size: 12px; }
}
