:root {
  color-scheme: dark;
  --library-bg: #0d121d;
  --library-paper: #f3e8d5;
  --library-muted: #b8adbb;
  --library-accent: #d94b64;
  font-family: "Noto Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--library-bg); color: var(--library-paper); }
body { min-height: 100vh; }
a { color: inherit; }

.library-shell {
  min-height: 100vh;
  padding: clamp(28px, 6vw, 88px);
  background:
    radial-gradient(circle at 75% 12%, rgba(217, 75, 100, .2), transparent 28%),
    linear-gradient(145deg, #151d2b, #090d15 66%);
}

.library-kicker { color: var(--library-accent); letter-spacing: .18em; text-transform: uppercase; font: 700 .78rem system-ui; }
.library-title { max-width: 12ch; margin: 18px 0; font-size: clamp(3rem, 8vw, 7rem); line-height: .96; font-weight: 600; }
.library-intro { max-width: 48rem; color: var(--library-muted); font: 1.08rem/1.8 system-ui; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: clamp(42px, 8vw, 96px); }
.book-card { min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; overflow: hidden; position: relative; text-decoration: none; border: 1px solid rgba(255,255,255,.12); border-radius: 28px; background: linear-gradient(150deg, var(--book-from, #20334f), var(--book-to, #611f34)); transition: transform .3s ease, border-color .3s ease; }
.book-card::before { content: ""; position: absolute; width: 240px; height: 240px; border: 36px solid rgba(246,235,216,.08); border-radius: 50%; top: -70px; right: -60px; }
.book-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.32); }
.book-card__meta { color: rgba(246,235,216,.68); font: .78rem/1.4 system-ui; letter-spacing: .12em; text-transform: uppercase; }
.book-card h2 { margin: 12px 0 8px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.book-card p { margin: 0; max-width: 28rem; color: rgba(246,235,216,.78); font: .95rem/1.65 system-ui; }
.book-error { max-width: 720px; margin: 20vh auto; padding: 32px; font-family: system-ui; }
.library-error { color: var(--library-muted); font: 1rem/1.7 system-ui; }
