/* =========================================================
   LittoralAI — Luxury eBook Marketplace
   Palette: #0F172A · #2563EB · #F59E0B · #F8FAFC
   Type: Poppins (display) · Inter (body)
   ========================================================= */

:root {
  --primary: #0F172A;
  --primary-soft: #1E293B;
  --secondary: #2563EB;
  --secondary-deep: #1D4ED8;
  --accent: #F59E0B;
  --accent-deep: #D97706;
  --bg: #F8FAFC;
  --bg-soft: #F1F5F9;
  --surface: rgba(255, 255, 255, 0.72);
  --line: rgba(15, 23, 42, 0.08);
  --muted: #64748B;
  --text: #0F172A;
  --radius: 16px;
  --radius-sm: 12px;
  --header-h: 72px;
  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-blur: blur(18px) saturate(160%);
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow-lift: 0 28px 60px rgba(15, 23, 42, 0.14);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  background: var(--primary);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}
.breadcrumbs {
  margin: 0 0 1.25rem;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .85rem;
  color: var(--muted);
}
.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  margin-left: .55rem;
  opacity: .55;
}
.breadcrumb-list a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb-list a:hover { color: var(--secondary); }
.breadcrumb-list [aria-current="page"] { color: var(--text); font-weight: 600; }
.book-card-cover picture,
.detail-cover picture {
  display: block;
  width: 100%;
  height: 100%;
}
.book-card-cover picture img,
.detail-cover picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
img.is-lazy { will-change: opacity; }


*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--secondary); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--secondary-deep); }

.page-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 8% -5%, rgba(37, 99, 235, 0.10), transparent 55%),
    radial-gradient(700px 420px at 95% 8%, rgba(245, 158, 11, 0.08), transparent 50%),
    linear-gradient(180deg, #F8FAFC 0%, #EEF2F7 50%, #F8FAFC 100%);
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-soft);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

.container-narrow { max-width: 760px; }

/* ── Brand ─────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--primary) !important;
  text-decoration: none !important;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 70%, var(--accent) 130%);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px 8px;
  background: rgba(255,255,255,.9);
  clip-path: polygon(0 0, 100% 0, 100% 30%, 38% 30%, 38% 100%, 0 100%);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

/* ── Header (glass) ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  transition: background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  background: rgba(248, 250, 252, 0.55);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.site-header.is-scrolled {
  background: rgba(248, 250, 252, 0.82);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.page-home .site-header:not(.is-scrolled) {
  background: rgba(15, 23, 42, 0.12);
  border-bottom-color: transparent;
}

.page-home .site-header:not(.is-scrolled) .brand-name,
.page-home .site-header:not(.is-scrolled) .nav-link,
.page-home .site-header:not(.is-scrolled) .btn-ghost {
  color: #F8FAFC !important;
}

.page-home .site-header:not(.is-scrolled) .btn-icon {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
  color: #fff;
}

.page-home .site-header:not(.is-scrolled) .navbar-toggler-icon {
  filter: invert(1);
}

.navbar { min-height: var(--header-h); }

.nav-link {
  font-weight: 500;
  font-size: .92rem;
  color: var(--primary-soft) !important;
  padding: .45rem .85rem !important;
  border-radius: 10px;
  transition: background .2s var(--ease), color .2s var(--ease);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--secondary) !important;
}

.nav-search .form-control {
  width: 160px;
  border-radius: 10px;
  border-color: var(--line);
  background: rgba(255,255,255,.85);
}

.btn-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}

.btn-icon:hover { transform: translateY(-2px); border-color: rgba(37,99,235,.35); }

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  border-radius: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  padding: .7rem 1.25rem;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--secondary-deep);
  border-color: var(--secondary-deep);
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--primary);
}
.btn-secondary:hover {
  border-color: rgba(37,99,235,.35);
  color: var(--secondary);
  background: #fff;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary);
}
.btn-accent:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--primary-soft);
}
.btn-ghost:hover { background: rgba(15,23,42,.05); color: var(--primary); }

.btn-ghost-light {
  background: transparent;
  border: 1px solid rgba(248,250,252,.35);
  color: #F8FAFC;
}
.btn-ghost-light:hover {
  background: rgba(248,250,252,.1);
  color: #fff;
  border-color: rgba(248,250,252,.55);
}

.btn-outline-primary {
  border: 1px solid rgba(37,99,235,.35);
  color: var(--secondary);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--secondary);
  color: #fff;
}

.btn-add {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  background: var(--primary);
  border: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-add:hover { background: var(--secondary); color: #fff; }

.btn-ink {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-ink:hover { background: var(--primary-soft); color: #fff; }

.btn-outline-ink {
  border: 1px solid rgba(15, 23, 42, 0.22);
  color: var(--primary);
  background: transparent;
}
.btn-outline-ink:hover { background: var(--primary); color: #fff; }

.btn-outline-light {
  border-color: rgba(248, 250, 252, 0.4);
  color: #F8FAFC;
  background: transparent;
}
.btn-outline-light:hover { background: #fff; color: var(--primary); }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 7rem 0 5.5rem;
  color: #F8FAFC;
  overflow: hidden;
}

.hero-plane {
  position: absolute;
  inset: 0;
  z-index: 0;
  will-change: transform;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(15,23,42,.96) 0%, rgba(15,23,42,.78) 42%, rgba(37,99,235,.45) 100%),
    linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
}

.hero-mesh {
  position: absolute;
  inset: 0;
  opacity: .45;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(37,99,235,.35), transparent 28%),
    radial-gradient(circle at 78% 22%, rgba(245,158,11,.22), transparent 24%),
    radial-gradient(circle at 60% 80%, rgba(37,99,235,.2), transparent 30%);
}

.hero-shelf {
  position: absolute;
  right: -4%;
  bottom: 8%;
  width: min(52vw, 680px);
  height: 58%;
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
  padding-right: 4vw;
  transform: perspective(900px) rotateY(-18deg) rotateX(6deg);
  transform-origin: right bottom;
}

.hero-spine {
  flex: 1;
  height: calc(62% + (var(--i) * 6%));
  border-radius: 6px 10px 10px 6px;
  background: linear-gradient(180deg, #334155, #0F172A);
  box-shadow: inset -8px 0 16px rgba(0,0,0,.25);
  opacity: .85;
  animation: spine-breathe 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * .35s);
}

.hero-spine:nth-child(2) { background: linear-gradient(180deg, #2563EB, #1E3A8A); }
.hero-spine:nth-child(3) { background: linear-gradient(180deg, #F59E0B, #B45309); height: 78%; }
.hero-spine:nth-child(4) { background: linear-gradient(180deg, #475569, #1E293B); }
.hero-spine:nth-child(5) { background: linear-gradient(180deg, #3B82F6, #1D4ED8); height: 70%; }
.hero-spine:nth-child(6) { background: linear-gradient(180deg, #64748B, #0F172A); }

@keyframes spine-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 5rem);
  letter-spacing: -0.045em;
  line-height: .95;
  margin: 0 0 .6rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: rgba(248, 250, 252, 0.92);
}

.hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: rgba(248, 250, 252, 0.72);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  width: 28px;
  height: 44px;
  border: 1.5px solid rgba(248,250,252,.35);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  z-index: 3;
}

.hero-scroll span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: #F8FAFC;
  animation: scroll-dot 1.6s var(--ease) infinite;
}

@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ── Sections ──────────────────────────────────────────── */
.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section-soft { background: rgba(241, 245, 249, 0.7); }

.section-ink {
  background:
    radial-gradient(600px 300px at 10% 0%, rgba(37,99,235,.25), transparent 50%),
    linear-gradient(160deg, #0F172A, #1E293B);
  color: #F8FAFC;
}

.section-stats {
  background:
    linear-gradient(180deg, transparent, rgba(37,99,235,.04)),
    var(--bg);
}

.section-head {
  margin-bottom: 2.25rem;
  max-width: 40rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 .4rem;
  color: var(--primary);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-head-light h2 { color: #F8FAFC; }
.section-head-light p { color: rgba(248,250,252,.65); }

.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: none;
}

.text-link {
  font-weight: 600;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.text-link::after { content: "→"; transition: transform .2s var(--ease); }
.text-link:hover::after { transform: translateX(4px); }

/* ── Books ─────────────────────────────────────────────── */
.book-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.35rem;
}

.book-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  will-change: transform;
}

.book-card:hover {
  transform: translateY(-8px);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.book-card-cover {
  display: block;
  aspect-ratio: 3 / 4;
  background: var(--bg-soft);
  overflow: hidden;
}

.book-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s var(--ease);
}

.book-card:hover .book-card-cover img { transform: scale(1.05); }

.cover-fallback {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
  color: #fff;
  background: linear-gradient(155deg, var(--primary), var(--secondary));
}

.cover-fallback span {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
}

.cover-fallback small { opacity: .75; margin-top: .45rem; }

.cover-fallback-sm {
  min-height: 0;
  height: 100%;
  padding: .5rem;
  justify-content: center;
  align-items: center;
}
.cover-fallback-sm span { font-size: 1.2rem; }

.book-card-body { padding: 1rem 1.05rem 1.1rem; }

.book-meta {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
  color: var(--muted);
}

.book-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: .3rem 0 .15rem;
  line-height: 1.3;
}

.book-card-body h3 a { color: var(--primary); }
.book-card-body h3 a:hover { color: var(--secondary); }

.book-author {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: .85rem;
}

.book-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-card-foot strong {
  font-family: var(--font-display);
  font-weight: 600;
}

/* ── Categories ────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.category-tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  color: var(--primary);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.category-tile:hover {
  transform: translateY(-4px);
  color: var(--primary);
  border-color: rgba(37,99,235,.25);
  box-shadow: 0 16px 32px rgba(15,23,42,.06);
}

.category-tile > i:first-child {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(37,99,235,.1);
  color: var(--secondary);
}

.category-tile strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.category-tile span {
  display: block;
  color: var(--muted);
  font-size: .88rem;
}

.tile-arrow {
  color: var(--muted);
  transition: transform .25s var(--ease), color .25s var(--ease);
}

.category-tile:hover .tile-arrow {
  transform: translateX(4px);
  color: var(--secondary);
}

/* ── Trending ──────────────────────────────────────────── */
.trending-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.trending-row {
  display: grid;
  grid-template-columns: 48px 56px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  color: var(--primary);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}

.trending-row:hover {
  transform: translateX(6px);
  color: var(--primary);
  border-color: rgba(37,99,235,.25);
}

.trending-rank {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: -0.02em;
}

.trending-cover {
  width: 56px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}

.trending-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-meta strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.trending-meta span {
  color: var(--muted);
  font-size: .9rem;
}

.trending-price {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--secondary);
}

/* ── Plans ─────────────────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.plan-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease);
}

.plan-card:hover { transform: translateY(-6px); }

.plan-card-featured {
  background: linear-gradient(165deg, #0F172A 0%, #1E3A8A 100%);
  color: #F8FAFC;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}

.plan-label {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--primary);
  padding: .3rem .55rem;
  border-radius: 8px;
}

.plan-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 .5rem;
}

.plan-blurb {
  color: var(--muted);
  font-size: .95rem;
  min-height: 3rem;
}

.plan-card-featured .plan-blurb { color: rgba(248,250,252,.7); }

.plan-price {
  display: flex;
  align-items: baseline;
  gap: .15rem;
  margin: .5rem 0 1.25rem;
}

.plan-currency {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
}

.plan-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.plan-period {
  color: var(--muted);
  margin-left: .25rem;
}

.plan-card-featured .plan-period { color: rgba(248,250,252,.55); }

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .4rem 0;
  font-size: .95rem;
}

.plan-features i { color: var(--secondary); margin-top: .2rem; }
.plan-card-featured .plan-features i { color: var(--accent); }

/* ── Authors ───────────────────────────────────────────── */
.author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.author-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  transition: transform .3s var(--ease), background .3s var(--ease);
}

.author-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,.1);
}

.author-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: #fff;
}

.author-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .3rem;
  letter-spacing: -0.02em;
}

.author-card p {
  margin: 0;
  color: rgba(248,250,252,.6);
  font-size: .88rem;
}

.author-sales {
  display: inline-block;
  margin-top: .75rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Testimonials ──────────────────────────────────────── */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.testimonial-card {
  margin: 0;
  padding: 1.6rem 1.4rem;
  border-radius: var(--radius);
  transition: transform .3s var(--ease);
}

.testimonial-card:hover { transform: translateY(-4px); }

.testimonial-card p {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--primary-soft);
  margin: 0 0 1.25rem;
  font-weight: 500;
}

.testimonial-card footer {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.testimonial-card strong {
  font-family: var(--font-display);
  font-weight: 600;
}

.testimonial-card span {
  color: var(--muted);
  font-size: .88rem;
}

/* ── Stats ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: var(--radius);
}

.stat-item strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  letter-spacing: -0.04em;
  color: var(--primary);
  line-height: 1;
  margin-bottom: .5rem;
}

.stat-item span {
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
}

/* ── FAQ ───────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.faq-item {
  border-radius: var(--radius-sm);
  padding: 0 1.15rem;
  transition: border-color .2s var(--ease);
}

.faq-item[open] { border-color: rgba(37,99,235,.3); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 1.1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  letter-spacing: -0.02em;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--secondary);
  font-weight: 500;
  transition: transform .25s var(--ease);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0 0 1.15rem;
  color: var(--muted);
  padding-right: 2rem;
}

/* ── Newsletter ────────────────────────────────────────── */
.newsletter-panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(125deg, rgba(37,99,235,.12), rgba(245,158,11,.1)),
    #fff;
  border: 1px solid var(--line);
}

.newsletter-copy h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0 0 .4rem;
}

.newsletter-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
}

.newsletter-form {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
}

.newsletter-form .form-control {
  flex: 1;
  min-width: 200px;
  border-radius: 12px;
  border-color: var(--line);
  padding: .85rem 1rem;
}

.newsletter-form .form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, 0.15);
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--primary);
  color: rgba(248, 250, 252, 0.7);
  padding: 4rem 0 1.5rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.brand-footer .brand-name { color: #F8FAFC; }

.footer-tagline {
  margin-top: .9rem;
  max-width: 280px;
  line-height: 1.6;
}

.site-footer h6 {
  color: #F8FAFC;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}

.site-footer a {
  display: block;
  color: rgba(248,250,252,.65);
  margin-bottom: .45rem;
  font-size: .95rem;
}

.site-footer a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(248,250,252,.1);
  font-size: .88rem;
}

/* ── Inner pages (keep usable) ─────────────────────────── */
.page-hero {
  padding: 3.25rem 0 1.5rem;
  background: linear-gradient(180deg, rgba(37,99,235,.06), transparent);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  margin-bottom: .35rem;
}

.page-hero-compact { padding-bottom: .75rem; }

.sidebar-panel,
.summary-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.sidebar-link {
  display: flex;
  justify-content: space-between;
  padding: .55rem 0;
  color: var(--primary);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.sidebar-link:last-child { border: 0; }
.sidebar-link.is-active { color: var(--secondary); }

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.35rem;
}

.flash-wrap { padding-top: 1rem; }

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(37,99,235,.14), transparent),
    radial-gradient(500px 280px at 90% 100%, rgba(245,158,11,.12), transparent),
    var(--bg);
}

.auth-shell { width: 100%; max-width: 440px; }

.auth-card {
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.85rem;
}

.form-control, .form-select {
  border-radius: 12px;
  border-color: var(--line);
  padding: .7rem .9rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, 0.15);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.detail-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.detail-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
}

.error-page {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: .75rem;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: 5rem;
  margin: 0;
  line-height: 1;
}

/* ── Netflix-style pricing page ────────────────────────── */
.pricing-hero {
  padding: 3.5rem 0 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(37,99,235,.08), transparent);
}
.pricing-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: .4rem;
}
.pricing-section { padding-top: 1.5rem; }
.current-plan-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.current-plan-banner strong { display: block; }
.current-plan-banner span { color: var(--muted); font-size: .9rem; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.pricing-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 1.75rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  overflow: hidden;
}
.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.pricing-card:hover {
  transform: translateY(-10px);
  border-color: rgba(37,99,235,.25);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.1);
}
.pricing-card:hover::before { opacity: 1; }
.pricing-card.is-featured {
  background: linear-gradient(165deg, #0F172A 0%, #1E3A8A 100%);
  color: #F8FAFC;
  border-color: transparent;
  transform: scale(1.03);
  z-index: 1;
}
.pricing-card.is-featured:hover {
  transform: scale(1.03) translateY(-8px);
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.28);
}
.pricing-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--primary);
  padding: .3rem .55rem;
  border-radius: 8px;
}
.pricing-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin: 0 0 .5rem;
}
.pricing-blurb {
  color: var(--muted);
  font-size: .92rem;
  min-height: 2.8rem;
  margin-bottom: .75rem;
}
.pricing-card.is-featured .pricing-blurb { color: rgba(248,250,252,.7); }
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: .15rem;
  margin-bottom: 1rem;
}
.pricing-price .currency {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}
.pricing-price .amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.8rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.pricing-price .period { color: var(--muted); margin-left: .2rem; }
.pricing-card.is-featured .period { color: rgba(248,250,252,.55); }
.pricing-meta,
.pricing-features { list-style: none; padding: 0; margin: 0 0 1rem; }
.pricing-meta li,
.pricing-features li {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  padding: .35rem 0;
  font-size: .92rem;
}
.pricing-meta { margin-bottom: .5rem; color: var(--muted); }
.pricing-card.is-featured .pricing-meta { color: rgba(248,250,252,.7); }
.pricing-features { flex: 1; margin-bottom: 1.25rem; }
.pricing-features i { color: var(--secondary); margin-top: .2rem; }
.pricing-card.is-featured .pricing-features i { color: var(--accent); }
.premium-tag,
.premium-ribbon {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  background: var(--accent);
  color: var(--primary);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .28rem .5rem;
  border-radius: 8px;
}
.book-card-cover { position: relative; }
.detail-cover { position: relative; }
.detail-cover.is-locked img,
.detail-cover.is-locked .cover-fallback { filter: saturate(.7) brightness(.85); }
.access-gate {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  margin: 1rem 0;
}
.access-gate strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: .35rem;
}
.access-gate p { color: var(--muted); margin-bottom: 1rem; }
.event-feed { list-style: none; padding: 0; }
.event-feed li {
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  align-items: baseline;
}
.event-feed li:last-child { border: 0; }
.event-feed em {
  color: var(--muted);
  font-style: normal;
  font-size: .85rem;
  margin-left: auto;
}
.sub-status-card .status-pill { text-transform: capitalize; }

@media (max-width: 1199.98px) {
  .plans-grid,
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991.98px) {
  .pricing-card.is-featured { transform: none; }
  .pricing-card.is-featured:hover { transform: translateY(-8px); }
}
@media (max-width: 575.98px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ── Dashboard ─────────────────────────────────────────── */
.dash-hero {
  padding: 3rem 0 1rem;
  background: linear-gradient(180deg, rgba(37,99,235,.07), transparent);
}

.dash-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: .35rem;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .85rem;
}

.dash-stat {
  padding: 1.1rem 1rem;
  border-radius: var(--radius);
  text-align: center;
}

.dash-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dash-stat span {
  color: var(--muted);
  font-size: .88rem;
}

.dash-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}

.dash-list-item:last-child { border-bottom: 0; }

.dash-nav .sidebar-link.active,
.dash-nav .sidebar-link.is-active {
  color: var(--secondary);
}

@media (max-width: 991.98px) {
  .dash-stats { grid-template-columns: 1fr 1fr; }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .plans-grid,
  .testimonial-grid,
  .stats-grid { grid-template-columns: 1fr 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .newsletter-panel { grid-template-columns: 1fr; }

  .hero {
    min-height: 92vh;
    align-items: center;
    padding-top: 6.5rem;
  }

  .hero-shelf {
    width: 58vw;
    opacity: .55;
    right: -8%;
  }
}

@media (max-width: 767.98px) {
  .plans-grid,
  .testimonial-grid,
  .stats-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .trending-row {
    grid-template-columns: 36px 48px 1fr;
    gap: .75rem;
  }

  .trending-price {
    grid-column: 3;
    justify-self: start;
  }

  .hero-shelf { display: none; }

  .hero-brand { font-size: 2.6rem; }

  .book-rail,
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: .85rem; }

  .section { padding: 3rem 0; }
}

@media (max-width: 419.98px) {
  .book-rail,
  .book-grid { grid-template-columns: 1fr; }

  .hero-cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-spine,
  .hero-scroll span { animation: none; }
  .book-card,
  .category-tile,
  .plan-card,
  .btn { transition: none; }
}

/* ── Advanced library ─────────────────────────────────────── */
.library-hero {
  padding: 3.5rem 0 2rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(37, 99, 235, .12), transparent 50%),
    linear-gradient(180deg, #eef2ff 0%, var(--surface, #F8FAFC) 100%);
}
.library-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.library-hero h1 {
  font-family: Poppins, sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: .25rem 0 .5rem;
  color: var(--primary, #0F172A);
}
.library-hero-copy { color: #64748b; margin: 0; max-width: 36ch; }
.library-search {
  display: flex;
  gap: .5rem;
  flex: 1 1 280px;
  max-width: 420px;
}
.library-search input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: .7rem 1rem;
  background: #fff;
}
.library-shelf { padding-top: 1.5rem; }
.library-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 300px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scroll-snap-type: x mandatory;
}
.continue-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: .85rem;
  padding: .85rem;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  transition: transform .2s ease, box-shadow .2s ease;
}
.continue-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
  color: inherit;
}
.continue-cover {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 2/3;
  background: #e2e8f0;
}
.continue-cover img { width: 100%; height: 100%; object-fit: cover; }
.continue-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.continue-body strong {
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-body span, .continue-body em { font-size: .78rem; color: #64748b; font-style: normal; }

.library-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}
.library-filters {
  position: sticky;
  top: 5.5rem;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 18px;
  padding: 1.1rem;
}
.filter-block { margin-bottom: 1.15rem; }
.filter-block h3 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  margin-bottom: .5rem;
}
.view-toggle { display: flex; gap: .35rem; }
.view-toggle a {
  flex: 1;
  text-align: center;
  padding: .45rem;
  border-radius: 10px;
  font-size: .82rem;
  color: #475569;
  background: #f1f5f9;
  text-decoration: none;
}
.view-toggle a.is-active {
  background: var(--secondary, #2563EB);
  color: #fff;
}
.filter-list { list-style: none; margin: 0; padding: 0; max-height: 160px; overflow: auto; }
.filter-list a {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .35rem .4rem;
  border-radius: 8px;
  font-size: .86rem;
  color: #334155;
  text-decoration: none;
}
.filter-list a:hover, .filter-list a.is-active {
  background: #eff6ff;
  color: var(--secondary, #2563EB);
}
.filter-list span { color: #94a3b8; font-size: .75rem; }
.filter-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  cursor: pointer;
}
.library-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.library-count { font-weight: 600; color: #475569; }

.library-results.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.library-results.library-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.lib-card {
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 18px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
  display: flex;
  flex-direction: column;
}
.lib-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .1);
}
.lib-card-library-list {
  flex-direction: row;
  align-items: stretch;
}
.lib-card-library-list .lib-card-cover {
  width: 110px;
  flex: 0 0 110px;
  aspect-ratio: auto;
  min-height: 150px;
}
.lib-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2/3;
  background: linear-gradient(145deg, #1e293b, #334155);
  overflow: hidden;
}
.lib-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.lib-card:hover .lib-card-cover img { transform: scale(1.04); }
.lib-progress-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(255,255,255,.25);
}
.lib-progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent, #F59E0B);
}
.continue-body .lib-progress-bar {
  position: static;
  height: 5px;
  border-radius: 99px;
  background: #e2e8f0;
  margin-top: .35rem;
  overflow: hidden;
}
.lib-progress-badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
  padding: .2rem .45rem;
  border-radius: 999px;
}
.lib-card-body { padding: 1rem 1.05rem 1.15rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.lib-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #94a3b8;
}
.lib-card-body h3 {
  font-family: Poppins, sans-serif;
  font-size: 1rem;
  margin: 0;
  line-height: 1.3;
}
.lib-card-body h3 a { color: var(--primary, #0F172A); text-decoration: none; }
.lib-card-author { margin: 0; color: #64748b; font-size: .88rem; }
.lib-card-pub { margin: 0; color: #94a3b8; font-size: .78rem; }
.lib-card-rating { color: var(--accent, #F59E0B); font-size: .78rem; display: flex; align-items: center; gap: .15rem; }
.lib-card-rating span { color: #64748b; margin-left: .25rem; }
.lib-card-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.lib-tag {
  font-size: .68rem;
  background: #eff6ff;
  color: #1d4ed8;
  padding: .15rem .45rem;
  border-radius: 999px;
}
.lib-card-actions {
  display: flex;
  gap: .4rem;
  margin-top: auto;
  padding-top: .75rem;
  align-items: center;
}
.lib-card-actions .js-favorite-form { margin: 0; }
.lib-card-actions .is-active { color: #e11d48; }

.library-loader {
  text-align: center;
  padding: 1.5rem;
  color: #64748b;
}
.library-loader .spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid #cbd5e1;
  border-top-color: var(--secondary, #2563EB);
  border-radius: 50%;
  animation: littoralai-spin .7s linear infinite;
  margin-right: .4rem;
  vertical-align: -2px;
}
@keyframes littoralai-spin { to { transform: rotate(360deg); } }

.bookmark-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.bookmark-chip {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .75rem 1rem;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  min-width: 160px;
}
.bookmark-chip:hover { border-color: #93c5fd; color: inherit; }
.bookmark-chip span { font-size: .8rem; color: #64748b; }

.reader-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.reader-progress-wrap { flex: 1 1 160px; min-width: 120px; }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; }
.review-item {
  padding: 1.15rem 1.25rem;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 14px;
}
.review-item .stars { color: var(--accent, #F59E0B); }
.review-item-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-left: .5rem;
  font-size: .75rem;
  font-weight: 600;
  color: #0f766e;
  background: #ccfbf1;
  padding: .15rem .5rem;
  border-radius: 999px;
  vertical-align: middle;
}
.rating-summary {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e8edf5;
  border-radius: 16px;
}
.rating-summary-avg {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stars-lg { font-size: 1.1rem; color: var(--accent, #F59E0B); margin: .35rem 0; }
.rating-bar-row {
  display: grid;
  grid-template-columns: 2rem 1fr 2rem;
  gap: .65rem;
  align-items: center;
  font-size: .85rem;
  margin-bottom: .35rem;
}
.rating-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.rating-bar > span {
  display: block;
  height: 100%;
  background: var(--accent, #F59E0B);
  border-radius: inherit;
}
.star-picker {
  display: flex;
  gap: .25rem;
}
.star-picker-btn {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 1.5rem;
  padding: .15rem;
  cursor: pointer;
  line-height: 1;
  transition: color .15s ease, transform .15s ease;
}
.star-picker-btn.is-on,
.star-picker-btn:hover { color: var(--accent, #F59E0B); }
.star-picker-btn:hover { transform: scale(1.08); }
.review-images {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .75rem 0 .25rem;
}
.review-images img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e8edf5;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  margin-top: .75rem;
}
.btn-helpful {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: .3rem .75rem;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #475569;
}
.btn-helpful.is-active {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}
.review-replies {
  margin-top: .9rem;
  padding-left: .85rem;
  border-left: 3px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.review-reply {
  font-size: .92rem;
}
.review-reply.is-staff {
  background: #f8fafc;
  padding: .65rem .75rem;
  border-radius: 10px;
}
.staff-badge {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #1d4ed8;
  background: #dbeafe;
  padding: .1rem .4rem;
  border-radius: 4px;
  margin-left: .35rem;
}
.review-reply-form {
  margin-top: .75rem;
}
.review-reply-form summary {
  cursor: pointer;
  color: #64748b;
  font-size: .9rem;
  list-style: none;
}
.review-reply-form summary::-webkit-details-marker { display: none; }
.review-status-note {
  font-size: .9rem;
  color: #0369a1;
  background: #e0f2fe;
  padding: .5rem .75rem;
  border-radius: 8px;
}
.review-status-note.is-warn {
  color: #9a3412;
  background: #ffedd5;
}
.review-body { margin-bottom: 0; }
@media (max-width: 575.98px) {
  .rating-summary { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
  .library-layout { grid-template-columns: 1fr; }
  .library-filters {
    position: static;
    display: none;
  }
  .library-filters.is-open { display: block; margin-bottom: 1rem; }
}
@media (max-width: 575.98px) {
  .library-results.library-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .lib-card-library-list { flex-direction: column; }
  .lib-card-library-list .lib-card-cover { width: 100%; min-height: 0; aspect-ratio: 2/3; }
}

