/* ============================================================
   Islamic eBook Library — Royal Islamic Celestial Library
   Book details / PDF download experience
   Scoped to .iel-book-page
   ============================================================ */

body.iel-book-page {
  --iel-bg: #100719;
  --iel-bg-2: #1c0d2d;
  --iel-surface: #2d1048;
  --iel-purple: #6d28d9;
  --iel-purple-light: #a855f7;
  --iel-violet: #2d1048;
  --iel-gold: #d4af37;
  --iel-gold-bright: #ffd76a;
  --iel-gold-soft: #f5d78e;
  --iel-text: #f6f0ff;
  --iel-muted: #c8bbd7;
  --iel-line: rgba(212, 175, 55, 0.24);
  --iel-panel: rgba(32, 13, 53, 0.72);
  --iel-font-display: "Cinzel", "Amiri", "Noto Serif Tamil", Georgia, serif;
  --iel-font-body: "Outfit", "Segoe UI", system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--iel-bg);
  background-image:
    radial-gradient(ellipse 900px 600px at 15% 8%, rgba(109, 40, 217, 0.18), transparent 62%),
    radial-gradient(ellipse 760px 520px at 88% 18%, rgba(212, 175, 55, 0.07), transparent 60%),
    radial-gradient(ellipse 900px 700px at 50% 100%, rgba(45, 16, 72, 0.42), transparent 65%),
    linear-gradient(180deg, #100719 0%, #1c0d2d 55%, #100719 100%);
  color: var(--iel-text);
  font-family: var(--iel-font-body);
  -webkit-font-smoothing: antialiased;
}

.iel-book-page *,
.iel-book-page *::before,
.iel-book-page *::after {
  box-sizing: border-box;
}

.iel-book-page a {
  -webkit-tap-highlight-color: transparent;
}

.iel-book-page a:focus-visible,
.iel-book-page button:focus-visible {
  outline: 2px solid var(--iel-gold-bright);
  outline-offset: 3px;
}

.iel-book-page img {
  display: block;
  max-width: 100%;
}

.iel-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  color: #1a0d2e;
  background: var(--iel-gold-bright);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.iel-skip-link:focus {
  transform: translateY(0);
}

.iel-book-page [lang="ta"] {
  font-family: "Noto Sans Tamil", "Outfit", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}

.iel-book-page [lang="ar"] {
  font-family: "Amiri", Georgia, serif;
  direction: rtl;
}

.iel-book-page ::selection {
  background: var(--iel-gold);
  color: #1a0d2e;
}

.iel-container {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Celestial background ---------- */
.iel-celestial {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 720px 520px at 50% 34%, rgba(109, 40, 217, 0.2), transparent 64%),
    radial-gradient(ellipse 600px 420px at 50% 48%, rgba(212, 175, 55, 0.055), transparent 62%);
}

.iel-celestial::before {
  content: "";
  position: absolute;
  inset: -10%;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23d4af37' stroke-opacity='0.1' stroke-width='1'%3E%3Cpath d='M90 10l20 60 60 20-60 20-20 60-20-60-60-20 60-20z'/%3E%3Ccircle cx='90' cy='90' r='25'/%3E%3Cpath d='M90 65v50M65 90h50'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 180px;
  mask-image: radial-gradient(ellipse at 50% 35%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 0%, transparent 72%);
}

.iel-celestial::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 46% 34% at 18% 22%, rgba(109, 40, 217, 0.14), transparent 70%),
    radial-gradient(ellipse 38% 30% at 84% 34%, rgba(212, 175, 55, 0.06), transparent 70%),
    radial-gradient(ellipse 55% 40% at 50% 96%, rgba(45, 16, 72, 0.38), transparent 70%);
}

.iel-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.iel-star {
  position: absolute;
  display: block;
  width: var(--iel-star-size, 2px);
  height: var(--iel-star-size, 2px);
  border-radius: 50%;
  background: #f6f0ff;
  opacity: 0.22;
  animation: ielStarTwinkle var(--iel-star-duration, 5s) ease-in-out var(--iel-star-delay, 0s) infinite alternate;
}

.iel-star.is-gold {
  background: var(--iel-gold-bright);
  box-shadow: 0 0 8px rgba(255, 215, 106, 0.52);
}

.iel-shooting-star {
  position: absolute;
  top: 13%;
  left: -14%;
  z-index: 2;
  width: 128px;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 106, 0.88), rgba(255, 240, 196, 0.7), transparent);
  transform: rotate(18deg);
  animation: ielShootingStar 19s ease-in-out 5s infinite;
}

.iel-star,
.iel-shooting-star {
  pointer-events: none;
}

.iel-page-hidden .iel-star,
.iel-page-hidden .iel-shooting-star {
  animation-play-state: paused;
}

@keyframes ielStarTwinkle {
  from { opacity: 0.18; transform: scale(0.68); }
  to { opacity: 0.88; transform: scale(1.12); }
}

@keyframes ielShootingStar {
  0%, 78% { opacity: 0; transform: translate3d(0, 0, 0) rotate(18deg); }
  80% { opacity: 0.78; }
  91% { opacity: 0; transform: translate3d(135vw, 46vh, 0) rotate(18deg); }
  100% { opacity: 0; transform: translate3d(135vw, 46vh, 0) rotate(18deg); }
}

/* ---------- Header ---------- */
.iel-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 7, 25, 0.76);
  border-bottom: 1px solid var(--iel-line);
  box-shadow: 0 1px 0 rgba(255, 215, 106, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: ielHeaderIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 74px;
}

.iel-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--iel-text);
  text-decoration: none;
  font-size: 1.02rem;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.iel-logo-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  color: var(--iel-gold-bright);
  background:
    linear-gradient(145deg, rgba(109, 40, 217, 0.9), rgba(45, 16, 72, 0.92));
  border: 1px solid rgba(212, 175, 55, 0.55);
  box-shadow:
    0 0 22px rgba(212, 175, 55, 0.22),
    inset 0 0 18px rgba(255, 215, 106, 0.08);
}

.iel-logo-mark svg {
  width: 26px;
  height: 26px;
}

.iel-logo-text b {
  font-weight: 700;
  background: linear-gradient(90deg, var(--iel-gold-bright), var(--iel-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.iel-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.iel-nav a {
  position: relative;
  display: inline-block;
  padding: 9px 0;
  color: var(--iel-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.22s ease;
}

.iel-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--iel-gold-bright), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.iel-nav a:hover,
.iel-nav a:focus-visible,
.iel-nav a[aria-current="page"] {
  color: var(--iel-gold-soft);
}

.iel-nav a:hover::after,
.iel-nav a:focus-visible::after,
.iel-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.iel-menu-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  flex: none;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 12px;
  color: var(--iel-gold-soft);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.iel-menu-toggle:hover {
  border-color: rgba(255, 215, 106, 0.65);
  background: rgba(212, 175, 55, 0.08);
}

.iel-menu-toggle:focus-visible {
  outline: 2px solid var(--iel-gold-bright);
  outline-offset: 3px;
}

.iel-menu-toggle svg {
  width: 22px;
  height: 22px;
}

.iel-mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 24px 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  background: rgba(16, 7, 25, 0.96);
}

.iel-mobile-nav.is-open {
  display: flex;
}

.iel-mobile-nav a {
  padding: 12px 2px;
  color: var(--iel-muted);
  text-decoration: none;
  font-size: 0.94rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.iel-mobile-nav a:last-child {
  border-bottom: 0;
}

.iel-mobile-nav a:hover,
.iel-mobile-nav a:focus-visible,
.iel-mobile-nav a[aria-current="page"] {
  color: var(--iel-gold-soft);
}

/* ---------- Main / breadcrumb ---------- */
.iel-main {
  position: relative;
  z-index: 1;
  padding: 30px 0 84px;
}

.iel-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 20px;
  margin-bottom: 34px;
  color: var(--iel-muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  animation: ielFadeUp 0.5s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-breadcrumb a {
  color: var(--iel-gold-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.iel-breadcrumb a:hover {
  color: var(--iel-gold-bright);
}

.iel-breadcrumb .iel-sep {
  color: rgba(212, 175, 55, 0.5);
}

.iel-breadcrumb [aria-current="page"] {
  overflow: hidden;
  max-width: 58ch;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Book layout ---------- */
.iel-book {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(36px, 4vw, 62px);
  align-items: start;
}

.iel-cover-column {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: ielCoverIn 0.72s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-cover-stage {
  position: relative;
  width: min(100%, 390px);
  padding: 16px;
  isolation: isolate;
}

.iel-cover-halo {
  position: absolute;
  inset: -16%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 215, 106, 0.24), rgba(109, 40, 217, 0.16) 36%, transparent 68%);
  filter: blur(12px);
  animation: ielHaloPulse 7s ease-in-out infinite;
}

.iel-cover-float {
  animation: ielCoverFloat 6.4s ease-in-out infinite;
  will-change: transform;
}

.iel-cover-frame {
  position: relative;
  padding: 10px;
  border-radius: 10px 15px 15px 10px;
  background:
    linear-gradient(145deg, rgba(255, 215, 106, 0.95), rgba(212, 175, 55, 0.52) 18%, rgba(45, 16, 72, 0.92) 52%, rgba(212, 175, 55, 0.5) 82%, rgba(255, 215, 106, 0.9));
  box-shadow:
    0 26px 55px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 215, 106, 0.16),
    0 0 34px rgba(212, 175, 55, 0.16);
  transform: perspective(1000px) rotateX(var(--iel-tilt-x, 0deg)) rotateY(var(--iel-tilt-y, 0deg));
  transition: transform 0.18s ease-out, box-shadow 0.28s ease;
}

.iel-cover-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 2;
  border: 1px solid rgba(255, 215, 106, 0.5);
  border-radius: 6px 11px 11px 6px;
  pointer-events: none;
}

.iel-cover-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border-radius: 4px 8px 8px 4px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 8%, transparent 92%, rgba(255, 255, 255, 0.05)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 18%);
}

.iel-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border-radius: 4px 9px 9px 4px;
  background: var(--iel-bg-2);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.32);
}

.iel-cover-column:hover .iel-cover-frame {
  box-shadow:
    0 32px 66px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 215, 106, 0.24),
    0 0 44px rgba(212, 175, 55, 0.22);
}

.iel-corner {
  position: absolute;
  z-index: 4;
  width: 25px;
  height: 25px;
  border-color: var(--iel-gold-bright);
  opacity: 0.9;
  pointer-events: none;
}

.iel-corner-tl {
  top: 0;
  left: 0;
  border-top: 2px solid;
  border-left: 2px solid;
  border-top-left-radius: 9px;
}

.iel-corner-tr {
  top: 0;
  right: 0;
  border-top: 2px solid;
  border-right: 2px solid;
  border-top-right-radius: 9px;
}

.iel-corner-bl {
  bottom: 0;
  left: 0;
  border-bottom: 2px solid;
  border-left: 2px solid;
  border-bottom-left-radius: 9px;
}

.iel-corner-br {
  bottom: 0;
  right: 0;
  border-bottom: 2px solid;
  border-right: 2px solid;
  border-bottom-right-radius: 9px;
}

.iel-cover-sparkle {
  position: absolute;
  z-index: 5;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--iel-gold-bright), var(--iel-gold));
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  filter: drop-shadow(0 0 6px rgba(255, 215, 106, 0.8));
  animation: ielSparkle 3.8s ease-in-out infinite;
  pointer-events: none;
}

.iel-sparkle-a {
  top: 6%;
  right: -5px;
  animation-delay: 0.4s;
}

.iel-sparkle-b {
  bottom: 13%;
  left: -6px;
  width: 7px;
  height: 7px;
  animation-delay: 1.7s;
}

.iel-cover-note {
  margin: 0;
  color: var(--iel-muted);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.8;
}

/* ---------- Information column ---------- */
.iel-info-column {
  min-width: 0;
  max-width: 700px;
  padding-top: 4px;
}

.iel-eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 16px;
  color: var(--iel-gold-soft);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  animation: ielFadeUp 0.5s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  flex: none;
  background: linear-gradient(90deg, var(--iel-gold), transparent);
}

.iel-title {
  margin: 0 0 20px;
  color: var(--iel-text);
  font-family: var(--iel-font-display);
  font-size: clamp(2.05rem, 4.6vw, 3.65rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  animation: ielFadeUp 0.62s 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-gold-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--iel-gold);
  animation: ielFadeUp 0.5s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-gold-rule::before,
.iel-gold-rule::after {
  content: "";
  height: 1px;
  flex: 1;
}

.iel-gold-rule::before {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.65), rgba(212, 175, 55, 0.04));
}

.iel-gold-rule::after {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.04), rgba(212, 175, 55, 0.65));
}

.iel-gold-rule svg {
  width: 15px;
  height: 15px;
  flex: none;
  filter: drop-shadow(0 0 5px rgba(255, 215, 106, 0.5));
}

.iel-byline {
  margin: 0 0 26px;
  animation: ielFadeUp 0.5s 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-author,
.iel-translator {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--iel-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.iel-translator {
  margin-top: 7px;
  font-size: 0.86rem;
  opacity: 0.88;
}

.iel-author svg,
.iel-translator svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--iel-gold);
}

.iel-author strong,
.iel-translator strong {
  color: var(--iel-gold-soft);
  font-weight: 600;
}

.iel-description-panel {
  position: relative;
  margin: 0 0 24px;
  padding: 22px 25px 23px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(45, 16, 72, 0.58), rgba(28, 13, 45, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: ielFadeUp 0.58s 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-description-panel::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, transparent, var(--iel-gold), transparent);
  opacity: 0.75;
}

.iel-panel-title {
  margin: 0 0 10px;
  color: var(--iel-gold-soft);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.iel-description {
  color: var(--iel-muted);
  font-size: 0.97rem;
  line-height: 1.82;
  overflow-wrap: anywhere;
}

.iel-description p {
  margin: 0;
}

.iel-description p + p {
  margin-top: 12px;
}

.iel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  animation: ielFadeUp 0.5s 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 999px;
  color: var(--iel-muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  line-height: 1.2;
}

.iel-meta svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--iel-gold);
}

.iel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 28px;
  animation: ielFadeUp 0.5s 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-tag {
  padding: 5px 10px;
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 999px;
  color: var(--iel-gold-soft);
  background: rgba(212, 175, 55, 0.07);
  font-size: 0.72rem;
  line-height: 1.25;
}

/* ---------- Download action ---------- */
.iel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 0 16px;
  animation: ielFadeUp 0.55s 0.58s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-download {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 274px;
  padding: 14px 18px 14px 15px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--iel-text);
  text-decoration: none;
  background:
    linear-gradient(135deg, #6d28d9 0%, #2d1048 62%, #4c1d95 100%) padding-box,
    linear-gradient(135deg, #ffd76a 0%, #d4af37 38%, rgba(212, 175, 55, 0.3) 66%, #ffd76a 100%) border-box;
  box-shadow:
    0 14px 34px rgba(109, 40, 217, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.iel-download::after {
  content: "";
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: -65%;
  z-index: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-18deg);
  animation: ielShimmer 4.8s ease-in-out infinite;
  pointer-events: none;
}

.iel-download > * {
  position: relative;
  z-index: 1;
}

.iel-download:hover {
  transform: translateY(-2px) scale(1.015);
  filter: brightness(1.06);
  box-shadow:
    0 18px 42px rgba(109, 40, 217, 0.45),
    0 0 28px rgba(255, 215, 106, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.iel-download:active {
  transform: translateY(0) scale(0.985);
}

.iel-download:focus-visible {
  outline: 2px solid var(--iel-gold-bright);
  outline-offset: 4px;
}

.iel-download-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid rgba(255, 215, 106, 0.35);
  border-radius: 12px;
  color: var(--iel-gold-bright);
  background: rgba(255, 215, 106, 0.13);
}

.iel-download-icon svg {
  width: 21px;
  height: 21px;
}

.iel-download-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.15;
  text-align: left;
}

.iel-download-label {
  font-size: 0.99rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.iel-download-sub {
  color: var(--iel-gold-soft);
  font-size: 0.71rem;
  letter-spacing: 0.02em;
  opacity: 0.86;
}

.iel-download-arrow {
  margin-left: auto;
  color: var(--iel-gold-bright);
  transition: transform 0.22s ease;
}

.iel-download-arrow svg {
  width: 19px;
  height: 19px;
}

.iel-download:hover .iel-download-arrow {
  transform: translateY(3px);
}

.iel-download.is-preparing {
  pointer-events: none;
}

.iel-download.is-preparing .iel-download-arrow svg {
  animation: ielSpin 0.9s linear infinite;
}

.iel-read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(212, 175, 55, 0.34);
  border-radius: 14px;
  color: var(--iel-gold-soft);
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.iel-read svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.iel-read:hover {
  color: var(--iel-gold-bright);
  border-color: rgba(255, 215, 106, 0.62);
  background: rgba(212, 175, 55, 0.09);
  transform: translateY(-1px);
}

.iel-download.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
  filter: grayscale(0.2);
  box-shadow: none;
}

.iel-download.is-disabled::after {
  display: none;
}

.iel-download.is-disabled:hover {
  transform: none;
  filter: grayscale(0.2);
  box-shadow: none;
}

.iel-back {
  display: inline-block;
  margin-top: 18px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--iel-muted);
  text-decoration: none;
  font-size: 0.84rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.iel-back:hover,
.iel-back:focus-visible {
  color: var(--iel-gold-soft);
  border-color: var(--iel-gold);
}

.iel-back:focus-visible {
  outline: 2px solid var(--iel-gold-bright);
  outline-offset: 3px;
}

.iel-assurance {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--iel-muted);
  font-size: 0.76rem;
  line-height: 1.4;
  animation: ielFadeUp 0.5s 0.64s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.iel-assurance svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--iel-gold);
}

/* ---------- Related books ---------- */
.iel-related {
  margin-top: clamp(58px, 8vw, 88px);
  padding-top: clamp(34px, 5vw, 48px);
  border-top: 1px solid rgba(212, 175, 55, 0.16);
}

.iel-related-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.iel-related-head .iel-eyebrow {
  margin-bottom: 8px;
  animation: none;
}

.iel-related-title {
  margin: 0;
  color: var(--iel-text);
  font-family: var(--iel-font-display);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.iel-related-all {
  flex: none;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.34);
  color: var(--iel-gold-soft);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.iel-related-all:hover {
  color: var(--iel-gold-bright);
  border-color: var(--iel-gold-bright);
}

.iel-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.iel-related-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 16px;
  color: var(--iel-text);
  background: linear-gradient(150deg, rgba(45, 16, 72, 0.56), rgba(28, 13, 45, 0.64));
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.iel-related-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--iel-bg-2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.iel-related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.iel-related-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding: 13px 14px 15px;
}

.iel-related-name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--iel-text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.iel-related-author {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--iel-gold-soft);
  font-size: 0.76rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.iel-related-meta {
  display: block;
  overflow: hidden;
  margin-top: auto;
  padding-top: 8px;
  color: var(--iel-muted);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.8;
}

.iel-related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.46);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), 0 0 24px rgba(212, 175, 55, 0.08);
}

.iel-related-card:hover .iel-related-cover img {
  transform: scale(1.035);
}

.iel-related-card:focus-visible {
  outline: 2px solid var(--iel-gold-bright);
  outline-offset: 4px;
}

/* ---------- Footer ---------- */
.iel-footer {
  position: relative;
  z-index: 1;
  padding: 25px 0 34px;
  border-top: 1px solid rgba(212, 175, 55, 0.16);
  color: var(--iel-muted);
  font-size: 0.8rem;
}

.iel-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.iel-footer p {
  margin: 0;
}

.iel-footer a {
  color: var(--iel-gold-soft);
  text-decoration: none;
}

.iel-footer a:hover,
.iel-footer a:focus-visible {
  color: var(--iel-gold-bright);
}

.iel-footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.iel-bottom-nav {
  display: none;
}

/* ---------- Animations ---------- */
@keyframes ielHeaderIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ielFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ielCoverIn {
  from { opacity: 0; transform: translateY(26px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ielCoverFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes ielHaloPulse {
  0%, 100% { opacity: 0.62; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.045); }
}

@keyframes ielSparkle {
  0%, 100% { opacity: 0; transform: scale(0.35) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(90deg); }
}

@keyframes ielShimmer {
  0%, 54% { transform: translateX(-180%) skewX(-18deg); opacity: 0; }
  64% { opacity: 0.7; }
  86%, 100% { transform: translateX(360%) skewX(-18deg); opacity: 0; }
}

@keyframes ielSpin {
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .iel-book {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 38px;
  }

  .iel-title {
    font-size: clamp(1.85rem, 4.8vw, 2.9rem);
  }
}

@media (max-width: 780px) {
  .iel-container {
    width: calc(100% - 40px);
  }

  .iel-header-inner {
    min-height: 66px;
  }

  .iel-nav {
    display: none;
  }

  .iel-menu-toggle {
    display: grid;
  }

  .iel-main {
    padding: 22px 0 62px;
  }

  .iel-breadcrumb {
    margin-bottom: 26px;
  }

  .iel-book {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .iel-cover-column {
    position: static;
    gap: 15px;
  }

  .iel-cover-stage {
    width: min(76vw, 322px);
  }

  .iel-info-column {
    max-width: none;
    padding-top: 0;
  }

  .iel-title {
    font-size: clamp(1.8rem, 7.2vw, 2.7rem);
  }

  .iel-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .iel-download {
    width: 100%;
    min-width: 0;
  }

  .iel-back {
    align-self: center;
    text-align: center;
  }

  .iel-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .iel-container {
    width: calc(100% - 28px);
  }

  .iel-logo-text {
    font-size: 0.93rem;
  }

  .iel-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .iel-cover-stage {
    width: min(82vw, 300px);
    padding: 13px;
  }

  .iel-description-panel {
    padding: 18px 19px;
  }

  .iel-download {
    padding: 13px 14px;
    gap: 11px;
  }

  .iel-download-icon {
    width: 41px;
    height: 41px;
  }

  .iel-download-label {
    font-size: 0.94rem;
  }

  .iel-meta li {
    font-size: 0.74rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .iel-book-page *,
  .iel-book-page *::before,
  .iel-book-page *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .iel-cover-float {
    animation: none;
  }

  .iel-cover-halo {
    animation: none;
  }

  .iel-cover-sparkle {
    animation: none;
    opacity: 0.7;
  }

  .iel-download::after {
    display: none;
  }

  .iel-cover-frame {
    transform: none;
  }
}

/* ---------- Related / mobile navigation ---------- */
@media (max-width: 960px) {
  .iel-related-grid {
    gap: 15px;
  }
}

@media (max-width: 780px) {
  body.iel-book-page {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .iel-related {
    margin-top: 48px;
    padding-top: 30px;
  }

  .iel-related-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }

  .iel-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .iel-related-name {
    font-size: 0.84rem;
  }

  .iel-related-author {
    font-size: 0.71rem;
  }

  .iel-related-meta {
    font-size: 0.62rem;
  }

  .iel-read {
    width: 100%;
  }

  .iel-footer-inner {
    padding-bottom: 4px;
  }

  .iel-footer-nav {
    justify-content: center;
    gap: 12px;
  }

  .iel-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(16, 7, 25, 0.92);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.25s ease;
  }

  .iel-bottom-nav a {
    display: flex;
    flex: 1;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 5px 2px;
    border-radius: 10px;
    color: var(--iel-muted);
    text-decoration: none;
    font-size: 0.63rem;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, background 0.2s ease;
  }

  .iel-bottom-nav a:hover,
  .iel-bottom-nav a:focus-visible {
    color: var(--iel-gold-soft);
    background: rgba(212, 175, 55, 0.08);
  }

  .iel-bottom-nav svg {
    width: 20px;
    height: 20px;
    flex: none;
  }

  body.iel-menu-open {
    overflow: hidden;
  }

  body.iel-menu-open .iel-bottom-nav {
    transform: translateY(110%);
  }

  html.no-js .iel-mobile-nav {
    display: flex;
  }

  html.no-js .iel-menu-toggle {
    display: none;
  }
}

@media (max-width: 430px) {
  .iel-related-grid {
    gap: 10px;
  }

  .iel-related-body {
    padding: 10px 11px 12px;
  }

  .iel-related-name {
    font-size: 0.8rem;
  }

  .iel-related-author {
    font-size: 0.68rem;
  }

  .iel-related-meta {
    font-size: 0.58rem;
  }

  .iel-bottom-nav a {
    font-size: 0.6rem;
  }
}

@media (hover: none) {
  .iel-related-card:hover {
    transform: none;
  }

  .iel-related-card:hover .iel-related-cover img {
    transform: none;
  }
}
