/*
Theme Name: LeituraKids
Theme URI: https://leiturakids.com
Author: LeituraKids
Description: Tema infantil em formato de streaming para catálogo e leitura de livros digitais — 100% gratuito.
Version: 2.0.1
Text Domain: leiturakids
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --lk-bg: #0a0e24;
  --lk-bg-2: #111739;
  --lk-bg-soft: #151c45;
  --lk-card: #18204d;
  --lk-line: rgba(255,255,255,.09);
  --lk-text: #ffffff;
  --lk-muted: #b4bddb;
  --lk-dim: #8e98bd;

  --lk-primary: #ff5c8a;   /* rosa-coral */
  --lk-primary-2: #9b6bff; /* lilás */
  --lk-orange: #ff9a4d;
  --lk-yellow: #ffd166;
  --lk-green: #34e0a1;
  --lk-sky: #5cc8ff;

  --lk-grad: linear-gradient(135deg, #ff5c8a 0%, #ff8a5c 55%, #ffb648 100%);
  --lk-grad-cool: linear-gradient(135deg, #9b6bff 0%, #5cc8ff 100%);
  --lk-grad-text: linear-gradient(90deg, #ffd166 0%, #ff8fb1 45%, #b79bff 100%);

  --lk-radius: 20px;
  --lk-radius-sm: 14px;
  --lk-shell: 1480px;

  --lk-font-display: "Baloo 2", "Nunito", ui-rounded, system-ui, sans-serif;
  --lk-font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --lk-ease: cubic-bezier(.2,.8,.2,1);
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--lk-text);
  font-family: var(--lk-font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background-color: var(--lk-bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(155,107,255,.20), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(255,92,138,.12), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(92,200,255,.10), transparent 60%);
  background-attachment: fixed;
}
/* Céu estrelado bem sutil no fundo de todo o site */
body:not(.lk-reader-body)::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 72%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 46% 34%, #ffe7a3 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 86%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 78% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 58%, #cfe9ff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 7% 92%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 8%, #fff 50%, transparent 51%);
  background-size: 640px 640px;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--lk-yellow); outline-offset: 3px; border-radius: 10px; }
h1, h2, h3 { font-family: var(--lk-font-display); }

.lk-shell { width: min(100% - 48px, var(--lk-shell)); margin-inline: auto; }
.lk-hidden { display: none !important; }
.lk-grad-text { background: var(--lk-grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ==========================================================================
   Header
   ========================================================================== */
.lk-header {
  position: fixed; z-index: 1000; inset: 0 0 auto;
  height: 78px; display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease, height .3s ease;
  background: linear-gradient(180deg, rgba(8,11,30,.85), rgba(8,11,30,.35) 70%, transparent);
}
.lk-header.is-scrolled {
  height: 68px;
  background: rgba(12,16,42,.82);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 var(--lk-line), 0 14px 40px rgba(0,0,0,.28);
}
.lk-header-inner { display: flex; align-items: center; gap: 26px; width: 100%; }
.lk-brand { display: flex; align-items: center; gap: 10px; font-family: var(--lk-font-display); font-size: 28px; font-weight: 800; letter-spacing: -.5px; white-space: nowrap; line-height: 1; }
.lk-brand .custom-logo { max-height: 46px; width: auto; }
.lk-brand-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 20px;
  background: var(--lk-grad); box-shadow: 0 8px 22px rgba(255,92,138,.38), inset 0 -3px 0 rgba(0,0,0,.12);
  transform: rotate(-6deg); transition: transform .3s var(--lk-ease);
}
.lk-brand:hover .lk-brand-mark { transform: rotate(4deg) scale(1.06); }
.lk-brand em { font-style: normal; background: var(--lk-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lk-nav { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 15px; }
.lk-nav a { padding: 9px 14px; border-radius: 999px; color: #e3e8fa; transition: background .2s, color .2s; }
.lk-nav a:hover, .lk-nav a.is-current { background: rgba(255,255,255,.10); color: #fff; }

.lk-header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lk-mobile-actions { display: none; }

.lk-free-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 900; color: #0d3a2b;
  background: linear-gradient(135deg, #5ff3bd, #34e0a1); box-shadow: 0 6px 18px rgba(52,224,161,.28);
}
.lk-free-pill i { font-style: normal; animation: lkTwinkle 2.4s ease-in-out infinite; display: inline-block; }

.lk-icon-btn {
  width: 42px; height: 42px; border: 1px solid var(--lk-line); border-radius: 14px;
  background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; font-size: 18px;
  transition: .2s var(--lk-ease);
}
.lk-icon-btn:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.lk-pill {
  min-height: 42px; padding: 0 18px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; background: #fff; color: #161a35; border: 0; transition: .2s var(--lk-ease);
}
.lk-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,255,255,.18); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.lk-btn {
  min-height: 52px; border: 0; border-radius: 16px; padding: 0 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--lk-font-body); font-weight: 900; font-size: 16px;
  transition: transform .2s var(--lk-ease), box-shadow .2s var(--lk-ease), background .2s;
}
.lk-btn:hover { transform: translateY(-2px); }
.lk-btn:active { transform: translateY(0) scale(.98); }
.lk-btn-primary { background: var(--lk-grad); color: #fff; box-shadow: 0 12px 30px rgba(255,92,138,.38), inset 0 -3px 0 rgba(0,0,0,.12); }
.lk-btn-primary:hover { box-shadow: 0 16px 40px rgba(255,92,138,.5), inset 0 -3px 0 rgba(0,0,0,.12); }
.lk-btn-secondary { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lk-btn-secondary:hover { background: rgba(255,255,255,.2); }
.lk-btn-secondary.is-active { background: rgba(255,92,138,.18); border-color: rgba(255,92,138,.5); }
.lk-btn-premium { background: var(--lk-grad); color: #fff; } /* compat: estilos antigos */

/* ==========================================================================
   Hero
   ========================================================================== */
.lk-hero { min-height: 700px; display: flex; align-items: flex-end; position: relative; overflow: hidden; background: #141a40; }
.lk-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10,14,36,.96) 0%, rgba(10,14,36,.80) 30%, rgba(10,14,36,.15) 66%, rgba(10,14,36,.40) 100%),
    linear-gradient(0deg, var(--lk-bg) 0%, rgba(10,14,36,.6) 18%, transparent 42%);
}
.lk-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .96; }
.lk-hero-sparkles { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.lk-hero-sparkles span { position: absolute; color: var(--lk-yellow); text-shadow: 0 0 14px rgba(255,209,102,.8); animation: lkTwinkle 3.2s ease-in-out infinite; }
.lk-hero-sparkles span:nth-child(1) { left: 8%;  top: 24%; font-size: 18px; animation-delay: .2s; }
.lk-hero-sparkles span:nth-child(2) { left: 38%; top: 16%; font-size: 12px; animation-delay: 1.1s; }
.lk-hero-sparkles span:nth-child(3) { left: 52%; top: 58%; font-size: 14px; animation-delay: 2s; color: #ffb3cb; }
.lk-hero-sparkles span:nth-child(4) { left: 4%;  top: 70%; font-size: 10px; animation-delay: 1.6s; color: #c7b3ff; }
.lk-hero-sparkles span:nth-child(5) { left: 30%; top: 40%; font-size: 9px;  animation-delay: .7s; }
.lk-hero-content { position: relative; z-index: 3; padding: 170px 0 130px; width: min(660px, 56vw); }
.lk-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.4px;
  color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16);
  padding: 8px 13px; border-radius: 999px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lk-hero h1 {
  font-size: clamp(44px, 5.4vw, 82px); line-height: .95; letter-spacing: -1.5px; margin: 20px 0 18px; font-weight: 800;
  text-shadow: 0 6px 30px rgba(0,0,0,.35);
}
.lk-hero p { font-size: 18px; line-height: 1.65; color: #dbe1f5; max-width: 590px; margin: 0 0 30px; }
.lk-meta-line { display: flex; flex-wrap: wrap; gap: 8px; color: #e7ebfa; font-size: 13px; font-weight: 800; margin-bottom: 22px; }
.lk-meta-line span { display: inline-flex; align-items: center; gap: 6px; }
.lk-hero .lk-meta-line span, .lk-detail-copy .lk-meta-line span {
  padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.10);
}
.lk-meta-line .lk-chip-free { background: rgba(52,224,161,.18) !important; border-color: rgba(52,224,161,.45) !important; color: #8ff5cf; }
.lk-action-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Perks strip
   ========================================================================== */
.lk-perks { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin: 0 0 46px; }
.lk-perk {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--lk-radius);
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid var(--lk-line);
}
.lk-perk-icon { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; }
.lk-perk:nth-child(1) .lk-perk-icon { background: linear-gradient(135deg,#34e0a1,#1fb987); }
.lk-perk:nth-child(2) .lk-perk-icon { background: linear-gradient(135deg,#ff5c8a,#ff8a5c); }
.lk-perk:nth-child(3) .lk-perk-icon { background: linear-gradient(135deg,#9b6bff,#5cc8ff); }
.lk-perk:nth-child(4) .lk-perk-icon { background: linear-gradient(135deg,#ffd166,#ff9a4d); }
.lk-perk b { display: block; font-family: var(--lk-font-display); font-size: 17px; line-height: 1.1; }
.lk-perk small { display: block; color: var(--lk-muted); font-size: 13px; font-weight: 700; margin-top: 3px; }

/* ==========================================================================
   Rails
   ========================================================================== */
.lk-content { position: relative; z-index: 3; margin-top: -60px; padding-bottom: 70px; }
.lk-rail { margin: 0 0 42px; position: relative; }
.lk-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.lk-rail-title { margin: 0; font-size: 26px; line-height: 1; letter-spacing: -.3px; font-weight: 800; display: flex; align-items: center; gap: 11px; }
.lk-rail-emoji { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: rgba(255,255,255,.08); border: 1px solid var(--lk-line); }
.lk-rail-link { color: var(--lk-muted); font-size: 14px; font-weight: 800; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--lk-line); transition: .2s; white-space: nowrap; }
.lk-rail-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.lk-track-wrap { position: relative; }
.lk-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(165px, 12.6vw); gap: 16px;
  overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 10px 4px 20px;
}
.lk-track::-webkit-scrollbar { display: none; }
.lk-rail-arrow {
  position: absolute; z-index: 4; top: calc(50% - 40px); width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); color: #fff; opacity: 0; transition: .2s var(--lk-ease);
  display: grid; place-items: center; font-size: 26px; line-height: 1;
  background: rgba(14,18,46,.85); backdrop-filter: blur(8px); box-shadow: 0 10px 26px rgba(0,0,0,.4);
}
.lk-track-wrap:hover .lk-rail-arrow { opacity: 1; }
.lk-rail-arrow:hover { background: #fff; color: #161a35; }
.lk-rail-prev { left: -14px; }
.lk-rail-next { right: -14px; }

/* ==========================================================================
   Book card
   ========================================================================== */
.lk-book-card { scroll-snap-align: start; position: relative; min-width: 0; }
.lk-book-card > a { display: block; }
.lk-book-cover {
  position: relative; aspect-ratio: 2/3; overflow: hidden; border-radius: 16px;
  background: linear-gradient(150deg, #2a3366, #151b44);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  transition: transform .35s var(--lk-ease), box-shadow .35s var(--lk-ease);
}
.lk-book-cover::before {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}
.lk-book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--lk-ease); }
.lk-book-cover::after {
  content: "▶"; position: absolute; z-index: 3; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  display: grid; place-items: center; border-radius: 50%; font-size: 18px; padding-left: 3px; color: #fff;
  background: var(--lk-grad); box-shadow: 0 10px 28px rgba(255,92,138,.55);
  opacity: 0; transform: scale(.6); transition: .3s var(--lk-ease);
}
.lk-book-card:hover .lk-book-cover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 22px 44px rgba(0,0,0,.5), 0 0 0 3px rgba(255,209,102,.85); }
.lk-book-card:hover .lk-book-cover img { transform: scale(1.06); }
.lk-book-card:hover .lk-book-cover::after { opacity: 1; transform: scale(1); }
.lk-badge {
  position: absolute; z-index: 4; top: 10px; left: 10px; display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; background: #fff; color: #111;
}
.lk-badge-free { background: linear-gradient(135deg, #5ff3bd, #34e0a1); color: #0d3a2b; box-shadow: 0 4px 12px rgba(52,224,161,.35); }
.lk-badge-premium { background: linear-gradient(135deg, #5ff3bd, #34e0a1); color: #0d3a2b; } /* compat */
.lk-card-title { font-family: var(--lk-font-display); font-size: 16px; font-weight: 700; line-height: 1.2; margin: 12px 2px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-card-meta { color: var(--lk-dim); font-size: 12px; font-weight: 700; margin: 0 2px; }
.lk-progress { height: 5px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.12); margin-top: 9px; }
.lk-progress > span { display: block; height: 100%; width: 0; background: var(--lk-grad); border-radius: inherit; }

/* ==========================================================================
   Themes (categorias)
   ========================================================================== */
.lk-themes { margin: 6px 0 50px; padding: 28px; border-radius: 28px; background: linear-gradient(135deg, rgba(155,107,255,.18), rgba(92,200,255,.10) 60%, rgba(255,92,138,.12)); border: 1px solid var(--lk-line); }
.lk-themes h2 { margin: 0 0 4px; font-size: 26px; }
.lk-themes p { margin: 0 0 18px; color: var(--lk-muted); font-weight: 700; }
.lk-theme-list { display: flex; flex-wrap: wrap; gap: 10px; }
.lk-theme-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px;
  font-weight: 900; font-size: 15px; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
  transition: .2s var(--lk-ease);
}
.lk-theme-chip small { font-size: 12px; opacity: .7; font-weight: 800; }
.lk-theme-chip:hover { transform: translateY(-2px) rotate(-1deg); background: #fff; color: #161a35; }

/* ==========================================================================
   Book detail
   ========================================================================== */
.lk-book-detail { min-height: 100vh; padding-top: 130px; position: relative; }
.lk-detail-glow { position: absolute; inset: 0 0 auto; height: 620px; overflow: hidden; z-index: -1; pointer-events: none; }
.lk-detail-glow img { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.3); opacity: .38; transform: scale(1.2); }
.lk-detail-glow::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--lk-bg) 0%, transparent 70%); }
.lk-detail-grid { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 64px; align-items: center; padding-bottom: 70px; }
.lk-detail-cover { position: relative; }
.lk-detail-cover img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.12); transform: rotate(-2deg); transition: transform .5s var(--lk-ease); }
.lk-detail-cover:hover img { transform: rotate(0) scale(1.02); }
.lk-detail-cover .lk-badge { top: 16px; left: 16px; }
.lk-detail-copy { max-width: 760px; }
.lk-detail-copy h1 { font-size: clamp(40px, 5vw, 70px); line-height: 1; letter-spacing: -1px; margin: 16px 0 18px; font-weight: 800; }
.lk-detail-copy .lk-description { color: #cfd5ec; font-size: 18px; line-height: 1.75; }
.lk-detail-copy .lk-description p { margin: 0 0 12px; }
.lk-detail-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.lk-detail-actions .lk-btn-primary { min-height: 58px; padding: 0 30px; font-size: 18px; }
.lk-section { padding: 30px 0 70px; }
.lk-section h2 { font-size: 28px; margin: 0 0 16px; }

/* ==========================================================================
   Archive / grid
   ========================================================================== */
.lk-page { padding: 130px 0 80px; min-height: 80vh; }
.lk-page-head { padding: 34px 34px 30px; margin-bottom: 26px; border-radius: 28px; background: linear-gradient(135deg, rgba(255,92,138,.20), rgba(155,107,255,.18) 50%, rgba(92,200,255,.12)); border: 1px solid var(--lk-line); position: relative; overflow: hidden; }
.lk-page-head::after { content: "✦ ✧ ✦"; position: absolute; right: 30px; top: 22px; font-size: 26px; letter-spacing: 12px; color: rgba(255,209,102,.6); }
.lk-page-title { font-size: 48px; margin: 0 0 6px; letter-spacing: -.8px; line-height: 1; }
.lk-page-subtitle { color: var(--lk-muted); margin: 0; font-size: 17px; font-weight: 700; }
.lk-book-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 30px 18px; }
.lk-filter-row { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.lk-filter {
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #e3e8fa; min-height: 42px; border-radius: 999px;
  padding: 0 18px; font-size: 14px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1;
  transition: .2s var(--lk-ease);
}
.lk-filter:hover { background: rgba(255,255,255,.14); }
.lk-filter.is-active { background: #fff; color: #161a35; border-color: #fff; }
.lk-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.lk-pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; background: rgba(255,255,255,.07); border: 1px solid var(--lk-line); }
.lk-pagination .page-numbers.current { background: var(--lk-grad); border-color: transparent; }

/* ==========================================================================
   Search overlay
   ========================================================================== */
.lk-search-overlay { position: fixed; z-index: 3000; inset: 0; background: rgba(8,11,30,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 90px 20px 30px; display: none; overflow-y: auto; }
.lk-search-overlay.is-open { display: block; animation: lkFade .25s ease; }
.lk-search-inner { width: min(960px, 100%); margin: auto; }
.lk-search-close { position: absolute; right: 25px; top: 22px; }
.lk-search-box { display: flex; gap: 10px; position: relative; }
.lk-search-box::before { content: "🔎"; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 20px; }
.lk-search-box input { width: 100%; height: 64px; border: 2px solid rgba(255,255,255,.16); border-radius: 20px; background: rgba(255,255,255,.06); color: #fff; padding: 0 20px 0 56px; outline: none; font-size: 19px; font-weight: 700; }
.lk-search-box input:focus { border-color: var(--lk-yellow); }
.lk-search-results { margin-top: 26px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.lk-footer { margin-top: 20px; padding: 50px 0 40px; background: linear-gradient(180deg, transparent, rgba(155,107,255,.10)); border-top: 1px solid var(--lk-line); color: var(--lk-dim); font-size: 14px; }
.lk-footer-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; padding-bottom: 30px; border-bottom: 1px solid var(--lk-line); }
.lk-footer .lk-brand { font-size: 26px; color: #fff; margin-bottom: 10px; }
.lk-footer-tag { margin: 0; max-width: 420px; line-height: 1.6; font-weight: 700; color: var(--lk-muted); }
.lk-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.lk-footer-links a { padding: 9px 14px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--lk-line); color: #e3e8fa; font-weight: 800; }
.lk-footer-links a:hover { background: rgba(255,255,255,.14); }
.lk-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; font-weight: 700; }

/* ==========================================================================
   Empty
   ========================================================================== */
.lk-empty { padding: 50px 20px; text-align: center; border: 2px dashed rgba(255,255,255,.16); border-radius: 24px; color: var(--lk-muted); font-weight: 700; grid-column: 1 / -1; }

/* ==========================================================================
   Reader
   ========================================================================== */
body.lk-reader-body { overflow: hidden; background: #070a1c; }
.lk-reader { min-height: 100dvh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(circle at 50% 42%, #1f2858 0%, #0e1230 52%, #05071a 100%); }
.lk-reader-top { height: 60px; flex: 0 0 60px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 18px; color: #fff; background: rgba(5,7,26,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 20; border-bottom: 1px solid var(--lk-line); }
.lk-reader-title { font-family: var(--lk-font-display); font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
.lk-reader-top .lk-reader-actions { justify-self: end; display: flex; gap: 8px; }
.lk-reader-stage { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; padding: 8px 76px; position: relative; overflow: hidden; }
#lk-book { margin: auto; display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.lk-reader-page { background: transparent !important; overflow: hidden; }
.lk-reader-page img { display: block; width: 100%; height: 100%; object-fit: contain; background: transparent !important; }
.lk-reader .stf__parent,
.lk-reader .stf__wrapper,
.lk-reader .stf__block,
.lk-reader .stf__item,
.lk-reader .stf__item.--left,
.lk-reader .stf__item.--right { background: transparent !important; }
.lk-reader-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; font-size: 26px; z-index: 18; transition: .2s var(--lk-ease); }
.lk-reader-prev { left: 18px; }
.lk-reader-next { right: 18px; }
.lk-reader-nav:hover { background: var(--lk-grad); border-color: transparent; transform: translateY(-50%) scale(1.06); }
.lk-reader-bottom { height: 48px; min-height: 48px; flex: 0 0 48px; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 5px 18px 8px; color: #d3d9ee; font-size: 13px; font-weight: 800; background: rgba(5,7,26,.45); }
.lk-reader-progress { width: min(520px, 55vw); height: 7px; border-radius: 99px; background: rgba(255,255,255,.13); overflow: hidden; }
.lk-reader-progress > span { height: 100%; display: block; width: 0; border-radius: inherit; background: var(--lk-grad); transition: width .25s ease; }
.lk-reader-lock { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: linear-gradient(145deg, #fff, #f4f0ff); color: #17131e; }
.lk-reader-loader { color: #fff; font-weight: 800; }

/* Fallback reader when the optional page-flip script cannot be loaded */
.lk-simple-reader { display: flex; align-items: center; justify-content: center; gap: 2px; width: 100%; height: 100%; }
.lk-simple-reader .lk-reader-page { display: none; height: var(--lk-simple-page-h, 100%); width: var(--lk-simple-page-w, 50%); max-height: 100%; max-width: 50%; background: transparent; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.lk-simple-reader .lk-reader-page.is-simple-visible { display: block; animation: lkSimplePage .2s ease; }

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes lkSimplePage { from { opacity: .45; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes lkTwinkle { 0%,100% { opacity: 1; transform: scale(1) rotate(0); } 50% { opacity: .35; transform: scale(.7) rotate(20deg); } }
@keyframes lkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lkRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.lk-hero-content > * { animation: lkRise .7s var(--lk-ease) both; }
.lk-hero-content > *:nth-child(2) { animation-delay: .08s; }
.lk-hero-content > *:nth-child(3) { animation-delay: .16s; }
.lk-hero-content > *:nth-child(4) { animation-delay: .24s; }
.lk-hero-content > *:nth-child(5) { animation-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .lk-perks { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1100px) {
  .lk-book-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .lk-nav { display: none; }
  .lk-track { grid-auto-columns: minmax(150px, 18vw); }
  .lk-detail-grid { grid-template-columns: 270px 1fr; gap: 40px; }
}

@media (max-width: 820px) {
  .lk-shell { width: min(100% - 32px, var(--lk-shell)); }
  .lk-header, .lk-header.is-scrolled { height: 64px; }
  .lk-header .lk-shell { width: calc(100% - 24px); }
  .lk-header-inner { height: 64px; gap: 8px; padding: 0; }
  .lk-brand { margin-right: auto; min-width: 0; flex: 0 1 auto; font-size: 22px; gap: 7px; }
  .lk-brand-mark { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; font-size: 17px; }
  .lk-brand .custom-logo { display: block; max-height: 34px; max-width: 120px; width: auto; object-fit: contain; }
  .lk-mobile-actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; white-space: nowrap; }
  .lk-mobile-actions a { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 9px; border-radius: 11px; color: #fff; font-size: 13px; font-weight: 900; line-height: 1; }
  .lk-mobile-actions a:hover { background: rgba(255,255,255,.08); }
  .lk-header-actions { margin-left: 0; gap: 0; flex: 0 0 auto; }
  .lk-header-actions .lk-icon-btn { width: 38px; height: 38px; border-radius: 12px; }
  .lk-pill, .lk-free-pill { display: none; }
  .lk-hero { min-height: 600px; }
  .lk-hero::after { background: linear-gradient(0deg, var(--lk-bg) 0%, rgba(10,14,36,.82) 44%, rgba(10,14,36,.15) 100%); }
  .lk-hero-content { width: 100%; padding: 200px 0 112px; }
  .lk-hero h1 { font-size: 46px; letter-spacing: -1px; }
  .lk-hero p { font-size: 16px; max-width: 95%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .lk-content { margin-top: -40px; }
  .lk-perks { gap: 10px; margin-bottom: 36px; }
  .lk-perk { padding: 12px; gap: 10px; border-radius: 16px; }
  .lk-perk-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 20px; border-radius: 12px; }
  .lk-perk b { font-size: 15px; }
  .lk-perk small { font-size: 12px; }
  .lk-track { grid-auto-columns: 36vw; gap: 12px; }
  .lk-rail-arrow { display: none; }
  .lk-rail-title { font-size: 22px; }
  .lk-book-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px 12px; }
  .lk-detail-grid { grid-template-columns: 1fr; gap: 30px; }
  .lk-detail-cover { width: min(58vw, 290px); margin: auto; }
  .lk-detail-copy { text-align: center; }
  .lk-detail-copy .lk-meta-line, .lk-detail-actions { justify-content: center; }
  .lk-detail-copy h1 { font-size: 42px; }
  .lk-themes { padding: 22px 18px; border-radius: 22px; }
  .lk-page-head { padding: 26px 22px; }
  .lk-page-head::after { display: none; }
  .lk-footer-top { grid-template-columns: 1fr; }
  .lk-footer-links { justify-content: flex-start; }
  .lk-footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .lk-search-results { grid-template-columns: repeat(3, 1fr); }
  .lk-reader-top { height: 52px; flex-basis: 52px; padding-inline: 10px; }
  .lk-reader-stage { padding: 0; }
  .lk-reader-nav { display: none; }
  .lk-reader-bottom { height: 42px; min-height: 42px; flex-basis: 42px; padding: 4px 10px max(4px, env(safe-area-inset-bottom)); }
  .lk-reader-progress { width: 60vw; }
  .lk-simple-reader { width: 100%; height: 100%; gap: 0; }
  .lk-simple-reader .lk-reader-page { max-width: 100%; width: var(--lk-simple-page-w, 100%); height: var(--lk-simple-page-h, 100%); }
  .lk-simple-reader .lk-reader-page img { object-fit: contain; }
}

@media (max-width: 520px) {
  .lk-shell { width: min(100% - 32px, var(--lk-shell)); }
  .lk-brand { font-size: 20px; gap: 6px; }
  .lk-brand-mark { width: 31px; height: 31px; flex-basis: 31px; }
  .lk-brand .custom-logo { max-height: 30px; max-width: 104px; }
  .lk-mobile-actions a { padding: 0 7px; font-size: 12px; }
  .lk-hero { min-height: 560px; }
  .lk-hero-content { padding-bottom: 104px; }
  .lk-hero h1 { font-size: 38px; }
  .lk-action-row .lk-btn { flex: 1; padding-inline: 12px; }
  .lk-perks { grid-template-columns: 1fr 1fr; }
  .lk-perk { flex-direction: column; align-items: flex-start; }
  .lk-rail { margin-bottom: 32px; }
  .lk-rail-title { font-size: 20px; }
  .lk-rail-emoji { width: 32px; height: 32px; font-size: 16px; border-radius: 10px; }
  .lk-rail-link { padding: 6px 10px; font-size: 12px; }
  .lk-track { grid-auto-columns: 42vw; }
  .lk-card-title { font-size: 15px; }
  .lk-book-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px 12px; }
  .lk-page { padding-top: 92px; }
  .lk-page-title { font-size: 34px; }
  .lk-detail-cover { width: min(68vw, 270px); }
  .lk-detail-copy h1 { font-size: 36px; }
  .lk-detail-copy .lk-description { font-size: 16px; }
  .lk-detail-actions .lk-btn { flex: 1 1 100%; }
  .lk-search-results { grid-template-columns: repeat(2, 1fr); }
}
