:root {
  --night: #050e17;
  --night-soft: #091725;
  --night-line: rgba(222, 190, 101, 0.22);
  --paper: #f3ede2;
  --paper-deep: #e4dbcd;
  --sheet: #fffdf8;
  --ink: #182536;
  --muted: #6d7883;
  --gold: #d9b85f;
  --gold-light: #f0d47d;
  --gold-dark: #947226;
  --line: rgba(24, 37, 54, 0.12);
  --cover-1: #082d35;
  --cover-2: #165663;
  --cover-accent: #d8b764;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input {
  font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(225, 192, 101, 0.72);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Premium gallery */
.library-home {
  min-height: 100vh;
  color: #f8f3e8;
  background:
    radial-gradient(circle at 50% -14rem, rgba(216, 183, 100, 0.12), transparent 32rem),
    linear-gradient(180deg, #07121d 0, #050d15 54%, #07111b 100%);
}

.library-home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.16;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 4px, rgba(255, 255, 255, 0.013) 4px 5px),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(255, 255, 255, 0.01) 5px 6px);
}

.library-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  color: white;
  background: rgba(5, 14, 23, 0.94);
  border-bottom: 1px solid rgba(218, 184, 95, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(22px);
}

.bar-inner {
  width: min(1240px, calc(100% - 42px));
  min-height: 82px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  direction: ltr;
}

.brand,
.reader-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
  direction: ltr;
}

.brand-mark,
.footer-mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 191, 96, 0.72);
  border-radius: 50%;
  color: var(--gold-light);
  background:
    radial-gradient(circle, rgba(218, 184, 95, 0.11), transparent 62%),
    #091725;
  box-shadow:
    inset 0 0 0 4px #091725,
    inset 0 0 0 5px rgba(218, 184, 95, 0.25);
  font: 600 25px/1 Georgia, serif;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-copy b {
  color: #e9ca72;
  font: 700 14px/1 "Inter", Arial, sans-serif;
  letter-spacing: 3.1px;
  white-space: nowrap;
}

.brand-copy small {
  color: #758696;
  font: 700 7px/1 "Inter", Arial, sans-serif;
  letter-spacing: 1.8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  direction: ltr;
}

.book-total {
  min-height: 46px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(218, 184, 95, 0.34);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  direction: ltr;
}

.book-total b {
  font: 800 15px/1 "Inter", Arial, sans-serif;
}

.book-total span {
  color: #a8b4bf;
  font: 700 8px/1 "Inter", Arial, sans-serif;
  letter-spacing: 1.3px;
}

.search-toggle {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(218, 184, 95, 0.58);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.025);
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
  color: var(--night);
  background: var(--gold-light);
}

.search-toggle[aria-expanded="true"] {
  transform: rotate(8deg);
}

.search-glyph {
  position: relative;
  width: 19px;
  height: 19px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.search-glyph::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: -6px;
  bottom: -2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.search-drawer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border-top: 1px solid transparent;
  transition: max-height 260ms ease, opacity 190ms ease, border-color 190ms ease;
}

.search-drawer.is-open {
  max-height: 118px;
  opacity: 1;
  border-top-color: rgba(255, 255, 255, 0.07);
}

.search-inner {
  width: min(760px, calc(100% - 34px));
  margin: auto;
  padding: 18px 0 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.library-search {
  min-width: 0;
  min-height: 56px;
  padding: 7px 13px 7px 18px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(218, 184, 95, 0.31);
  border-radius: 999px;
  color: #697886;
  background: #fffdf8;
  box-shadow: 0 17px 46px rgba(0, 0, 0, 0.22);
}

.library-search .search-glyph {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: #526475;
}

.library-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #1e2d3d;
  background: transparent;
  font-size: 14px;
  line-height: 1.7;
}

.library-search input::placeholder {
  color: #8a949e;
  opacity: 1;
}

.library-search input::-webkit-search-cancel-button {
  display: none;
}

.library-search button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 50%;
  color: #526475;
  background: #eee8dd;
  font: 500 22px/1 Arial, sans-serif;
}

.library-search button[hidden] {
  display: none;
}

.search-result {
  min-width: 64px;
  color: #8293a2;
  font-size: 10px;
  white-space: nowrap;
}

.collection-heading {
  width: min(1240px, calc(100% - 42px));
  margin: auto;
  padding: 33px 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.collection-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a18542;
  direction: ltr;
}

.collection-heading span {
  font: 700 8px/1 "Inter", Arial, sans-serif;
  letter-spacing: 1.8px;
}

.collection-heading i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.collection-heading h1 {
  margin: 9px 0 0;
  color: #c4cdd5;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 500;
}

.book-gallery {
  width: min(1240px, calc(100% - 42px));
  min-height: 60vh;
  margin: auto;
  padding: 20px 0 108px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 68px 48px;
}

.book-card {
  min-width: 0;
  order: var(--desktop-order);
}

.book-card[hidden],
.no-result[hidden] {
  display: none !important;
}

.book-link {
  display: block;
  color: inherit;
  text-decoration: none;
  perspective: 1500px;
}

/* Physical 6×9 premium covers — generated with CSS, never duplicate images */
.premium-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  padding: 29px 34px 27px 38px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 17px 7px 7px 17px;
  color: white;
  background:
    radial-gradient(circle at 79% 4%, rgba(255, 255, 255, 0.13), transparent 25%),
    repeating-radial-gradient(circle at 20% 10%, transparent 0 3px, rgba(255, 255, 255, 0.012) 3px 4px),
    linear-gradient(145deg, var(--cover-1), var(--cover-2));
  box-shadow:
    19px 26px 56px rgba(0, 0, 0, 0.44),
    -1px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 1px rgba(255, 255, 255, 0.13),
    inset -12px 0 22px rgba(0, 0, 0, 0.16);
  transform-origin: center right;
  transition: transform 280ms cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 280ms ease;
  isolation: isolate;
}

.premium-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: 0.54;
  pointer-events: none;
}

.premium-cover::after {
  content: "";
  position: absolute;
  inset: 12px 17px 12px 12px;
  z-index: -2;
  border: 1px solid rgba(225, 192, 101, 0.56);
  border-radius: 11px 3px 3px 11px;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

.book-link:hover .premium-cover {
  transform: translateY(-10px) rotateY(-2.2deg);
  box-shadow:
    25px 38px 72px rgba(0, 0, 0, 0.54),
    inset 0 1px rgba(255, 255, 255, 0.14),
    inset -12px 0 22px rgba(0, 0, 0, 0.17);
}

.book-link:active .premium-cover {
  transform: translateY(-3px) rotateY(-1deg) scale(0.995);
}

.cover-spine {
  position: absolute;
  top: -1px;
  right: -1px;
  bottom: -1px;
  width: 22px;
  z-index: 7;
  border-left: 1px solid rgba(255, 255, 255, 0.19);
  background:
    repeating-linear-gradient(0deg, transparent 0 78px, rgba(218, 184, 95, 0.7) 79px 80px, transparent 81px 85px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.36), rgba(255, 255, 255, 0.09) 46%, rgba(0, 0, 0, 0.3));
  box-shadow: -5px 0 14px rgba(0, 0, 0, 0.23);
}

.cover-frame {
  position: absolute;
  inset: 39px 43px 39px 47px;
  z-index: -1;
  border-block: 1px solid rgba(225, 192, 101, 0.28);
  pointer-events: none;
}

.cover-corners {
  position: absolute;
  inset: 19px 30px 19px 24px;
  z-index: -1;
  pointer-events: none;
}

.cover-corners::before,
.cover-corners::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 14px;
  border-left: 1px solid var(--cover-accent);
  opacity: 0.7;
}

.cover-corners::before {
  top: 0;
  border-top: 1px solid var(--cover-accent);
}

.cover-corners::after {
  bottom: 0;
  border-bottom: 1px solid var(--cover-accent);
}

.cover-motif {
  position: absolute;
  z-index: -1;
  display: block;
  color: var(--cover-accent);
  opacity: 0.53;
  pointer-events: none;
}

.cover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  direction: ltr;
}

.cover-head b,
.cover-head i {
  color: var(--cover-accent);
  font: 800 8px/1 "Inter", Arial, sans-serif;
  font-style: normal;
  letter-spacing: 1.65px;
}

.cover-head i {
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 1px;
}

.cover-body {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cover-body > small {
  min-height: 29px;
  padding: 5px 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(229, 203, 130, 0.29);
  border-radius: 999px;
  color: #e4e9e8;
  background: rgba(0, 0, 0, 0.1);
  font-size: 9px;
  line-height: 1.6;
}

.cover-body strong {
  width: 100%;
  margin-top: 23px;
  font-family: "Noto Nastaliq Urdu", "Noto Sans Arabic", serif;
  font-size: clamp(34px, 3.35vw, 47px);
  line-height: 1.64;
  font-weight: 700;
  text-wrap: balance;
  text-shadow: 0 9px 23px rgba(0, 0, 0, 0.28);
}

.premium-cover.title-long .cover-body strong {
  font-size: clamp(30px, 3vw, 41px);
}

.premium-cover.title-xlong .cover-body strong {
  font-size: clamp(26px, 2.62vw, 36px);
  line-height: 1.72;
}

.premium-cover.title-xxlong .cover-body strong {
  font-size: clamp(23px, 2.32vw, 32px);
  line-height: 1.78;
}

.cover-rule {
  width: 82px;
  height: 3px;
  margin: 13px 0 17px;
  display: block;
  border-radius: 3px;
  background: var(--cover-accent);
  box-shadow: 0 0 18px rgba(225, 192, 101, 0.2);
}

.cover-body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  line-height: 2;
}

.cover-author {
  padding-top: 17px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(229, 203, 130, 0.22);
  direction: ltr;
}

.cover-author small {
  color: rgba(255, 255, 255, 0.54);
  font: 600 7px/1.4 "Inter", Arial, sans-serif;
  letter-spacing: 0.35px;
}

.cover-author b {
  color: var(--cover-accent);
  font: 700 11px/1.2 "Inter", Arial, sans-serif;
  letter-spacing: 0.2px;
}

/* Twelve title-aware geometric languages */
.motif-compass::before {
  background: radial-gradient(circle at 2% 52%, transparent 0 145px, var(--cover-accent) 146px 147px, transparent 148px 192px, rgba(255, 255, 255, 0.14) 193px 194px, transparent 195px);
}

.motif-compass .cover-motif {
  width: 132px;
  height: 132px;
  left: 50%;
  bottom: 90px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: translateX(-50%);
}

.motif-compass .cover-motif::before,
.motif-compass .cover-motif::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.motif-compass .cover-motif::before {
  width: 1px;
  height: 154px;
}

.motif-compass .cover-motif::after {
  width: 154px;
  height: 1px;
}

.motif-compass .cover-motif i {
  position: absolute;
  inset: 34px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.motif-ascent::before {
  background: linear-gradient(135deg, transparent 0 63%, rgba(255, 255, 255, 0.075) 63.4%, transparent 63.8%);
}

.motif-ascent .cover-motif {
  left: 38px;
  bottom: 95px;
  width: 170px;
  height: 115px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  clip-path: polygon(0 100%, 0 76%, 25% 76%, 25% 54%, 50% 54%, 50% 30%, 75% 30%, 75% 8%, 100% 8%, 100% 100%);
  background: rgba(225, 192, 101, 0.12);
}

.motif-ascent .cover-motif::after {
  content: "↗";
  position: absolute;
  top: -25px;
  right: -8px;
  font: 300 36px/1 Georgia, serif;
}

.motif-grid::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
}

.motif-grid .cover-motif {
  width: 156px;
  height: 156px;
  left: -48px;
  top: 31%;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  box-shadow: 28px -28px 0 -1px transparent, 28px -28px 0 0 rgba(225, 192, 101, 0.38);
}

.motif-wave::before {
  background:
    radial-gradient(ellipse at 0 72%, transparent 0 84px, rgba(255, 255, 255, 0.13) 85px 86px, transparent 87px 123px, rgba(225, 192, 101, 0.45) 124px 125px, transparent 126px);
}

.motif-wave .cover-motif {
  width: 235px;
  height: 70px;
  left: 26px;
  bottom: 97px;
  border-top: 1px solid currentColor;
  border-radius: 50%;
  transform: rotate(-9deg);
  box-shadow: 0 -20px 0 -19px rgba(255, 255, 255, 0.44), 0 20px 0 -19px rgba(255, 255, 255, 0.3);
}

.motif-links::before {
  background: linear-gradient(145deg, transparent 0 59%, rgba(255, 255, 255, 0.07) 59.4%, transparent 59.8%);
}

.motif-links .cover-motif {
  width: 126px;
  height: 126px;
  left: 31px;
  bottom: 90px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.motif-links .cover-motif::after {
  content: "";
  position: absolute;
  width: 126px;
  height: 126px;
  left: 71px;
  top: -1px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.motif-pages::before {
  background: repeating-linear-gradient(145deg, transparent 0 62px, rgba(255, 255, 255, 0.06) 63px 64px);
}

.motif-pages .cover-motif {
  width: 182px;
  height: 112px;
  left: 50%;
  bottom: 90px;
  border: 1px solid currentColor;
  border-radius: 5px 22px 5px 5px;
  transform: translateX(-50%);
}

.motif-pages .cover-motif::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid currentColor;
  box-shadow: -10px 0 20px rgba(0, 0, 0, 0.18);
}

.motif-pages .cover-motif::after {
  content: "";
  position: absolute;
  inset: 25px 20px;
  border-block: 1px solid rgba(255, 255, 255, 0.36);
}

.motif-neural::before {
  background: radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.1), transparent 19%);
}

.motif-neural .cover-motif {
  width: 205px;
  height: 145px;
  left: 28px;
  bottom: 78px;
  background:
    radial-gradient(circle at 10% 70%, currentColor 0 3px, transparent 4px),
    radial-gradient(circle at 35% 28%, currentColor 0 4px, transparent 5px),
    radial-gradient(circle at 58% 65%, currentColor 0 3px, transparent 4px),
    radial-gradient(circle at 84% 20%, currentColor 0 4px, transparent 5px),
    linear-gradient(33deg, transparent 0 27%, currentColor 27.5% 28%, transparent 28.5% 100%);
}

.motif-neural .cover-motif::before,
.motif-neural .cover-motif::after {
  content: "";
  position: absolute;
  height: 1px;
  background: currentColor;
  transform-origin: left;
}

.motif-neural .cover-motif::before {
  width: 118px;
  left: 42px;
  top: 41px;
  transform: rotate(24deg);
}

.motif-neural .cover-motif::after {
  width: 96px;
  left: 20px;
  top: 101px;
  transform: rotate(-32deg);
}

.motif-growth::before {
  background: linear-gradient(120deg, transparent 62%, rgba(255, 255, 255, 0.06) 62.4%, transparent 62.8%);
}

.motif-growth .cover-motif {
  left: 50px;
  bottom: 84px;
  width: 214px;
  height: 135px;
  border-bottom: 1px solid currentColor;
  background:
    linear-gradient(to top, rgba(225, 192, 101, 0.18) 0 35%, transparent 35%) 0 100% / 32px 62% no-repeat,
    linear-gradient(to top, rgba(225, 192, 101, 0.2) 0 56%, transparent 56%) 53px 100% / 32px 82% no-repeat,
    linear-gradient(to top, rgba(225, 192, 101, 0.23) 0 72%, transparent 72%) 106px 100% / 32px 100% no-repeat;
}

.motif-growth .cover-motif::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 1px;
  left: 4px;
  top: 90px;
  background: currentColor;
  transform: rotate(-24deg);
  transform-origin: left;
}

.motif-horizon::before {
  background: radial-gradient(circle at 18% 82%, rgba(225, 192, 101, 0.16), transparent 20%);
}

.motif-horizon .cover-motif {
  width: 250px;
  height: 100px;
  left: 24px;
  bottom: 82px;
  border-top: 1px solid currentColor;
  background: linear-gradient(to top, transparent 48%, rgba(255, 255, 255, 0.1) 49% 50%, transparent 51%);
}

.motif-horizon .cover-motif::after {
  content: "";
  position: absolute;
  width: 45px;
  height: 45px;
  top: -23px;
  left: 67px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.motif-orbit::before {
  background: radial-gradient(circle at 82% 23%, rgba(255, 255, 255, 0.09), transparent 24%);
}

.motif-orbit .cover-motif {
  width: 206px;
  height: 112px;
  left: 48px;
  bottom: 87px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: rotate(-13deg);
  box-shadow: inset 0 0 0 25px transparent, inset 0 0 0 26px rgba(255, 255, 255, 0.25);
}

.motif-orbit .cover-motif::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  right: 18px;
  top: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: -111px 90px 0 -3px currentColor;
}

.motif-balance::before {
  background: linear-gradient(45deg, transparent 0 70%, rgba(255, 255, 255, 0.06) 70.4%, transparent 70.8%);
}

.motif-balance .cover-motif {
  width: 185px;
  height: 125px;
  left: 48px;
  bottom: 82px;
  border-top: 1px solid currentColor;
}

.motif-balance .cover-motif::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1px;
  height: 112px;
  border-left: 1px solid currentColor;
}

.motif-balance .cover-motif::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 12px;
  height: 44px;
  border: 1px solid currentColor;
  border-top: 0;
  clip-path: polygon(0 0, 42% 0, 50% 100%, 58% 0, 100% 0, 100% 100%, 0 100%);
}

.motif-path::before {
  background: linear-gradient(155deg, transparent 0 46%, rgba(255, 255, 255, 0.07) 46.4% 56%, transparent 56.4%);
}

.motif-path .cover-motif {
  width: 245px;
  height: 120px;
  left: 25px;
  bottom: 75px;
  border-top: 1px solid currentColor;
  border-radius: 50%;
  transform: rotate(-16deg);
}

.motif-path .cover-motif::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 80px;
  left: 26px;
  top: 24px;
  border-top: 1px dashed rgba(255, 255, 255, 0.52);
  border-radius: 50%;
}

.collection-quote {
  order: 4;
  grid-column: 1 / -1;
  width: min(900px, 100%);
  margin: 2px auto 0;
  padding: 31px clamp(25px, 5vw, 58px) 29px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(218, 184, 95, 0.36);
  border-radius: 18px;
  color: #d9e0e5;
  background:
    linear-gradient(110deg, rgba(218, 184, 95, 0.07), transparent 42%),
    rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  text-align: center;
}

.collection-quote > span {
  color: var(--gold);
  font: 500 50px/1 Georgia, serif;
}

.collection-quote blockquote {
  margin: 0;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 2;
}

.collection-quote cite {
  color: var(--gold);
  font: 600 10px/1.5 "Inter", Arial, sans-serif;
  font-style: normal;
  white-space: nowrap;
}

.book-grid.is-filtering .collection-quote {
  display: none;
}

.no-result,
.no-books {
  margin: 25px 0 40px;
  padding: 74px 22px;
  border: 1px dashed rgba(218, 184, 95, 0.34);
  border-radius: 24px;
  color: #d4dce2;
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.no-result b,
.no-books b {
  display: block;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: 25px;
  line-height: 1.8;
}

.no-result p,
.no-books p {
  margin: 5px 0 0;
  color: #82919e;
  font-size: 11px;
}

.no-books code {
  padding: 2px 6px;
  border-radius: 5px;
  color: #f0d27a;
  background: rgba(255, 255, 255, 0.08);
  direction: ltr;
}

.site-footer,
.reader-footer {
  min-height: 205px;
  padding: 42px 20px calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #7f909e;
  background:
    radial-gradient(circle at 50% 0, rgba(218, 184, 95, 0.08), transparent 19rem),
    #040b12;
  border-top: 1px solid rgba(218, 184, 95, 0.16);
  text-align: center;
  direction: ltr;
}

.footer-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  margin-bottom: 4px;
  font-size: 20px;
}

.site-footer > b,
.reader-footer > b {
  color: #e6c66c;
  font: 800 10px/1 "Inter", Arial, sans-serif;
  letter-spacing: 3px;
}

.site-footer p,
.reader-footer p {
  margin: 0;
  font: 600 9px/1.7 "Inter", Arial, sans-serif;
  letter-spacing: 0.35px;
}

.site-footer p strong,
.reader-footer p strong {
  color: #d2dbe1;
}

.site-footer small {
  color: #4f626f;
  font: 600 8px/1 "Inter", Arial, sans-serif;
}

/* Book page and reader */
.reader-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -8rem, rgba(216, 183, 100, 0.15), transparent 28rem),
    var(--paper);
}

.reader-bar {
  position: sticky;
  top: 0;
  z-index: 220;
  color: white;
  background: linear-gradient(100deg, var(--cover-1), #07131f);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 10px 34px rgba(20, 32, 48, 0.14);
  backdrop-filter: blur(20px);
}

.reader-bar-inner {
  width: min(1260px, calc(100% - 34px));
  min-height: 72px;
  margin: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  direction: ltr;
}

.reader-brand {
  gap: 10px;
}

.reader-brand .brand-mark {
  width: 39px;
  height: 39px;
  flex-basis: 39px;
  color: var(--cover-accent);
  border-color: var(--cover-accent);
  font-size: 20px;
}

.reader-brand > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reader-brand b {
  color: var(--cover-accent);
  font: 800 10px/1 "Inter", Arial, sans-serif;
  letter-spacing: 2.1px;
}

.reader-brand small {
  color: rgba(255, 255, 255, 0.55);
  font: 600 7px/1 "Inter", Arial, sans-serif;
}

.reader-book-title {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  direction: ltr;
}

.reader-position {
  color: #aebac3;
  font: 600 9px/1 "Inter", Arial, sans-serif;
  white-space: nowrap;
}

.reader-back {
  min-height: 39px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #e9eef0;
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  font-size: 9px;
  direction: rtl;
}

.reader-back span {
  color: var(--cover-accent);
  font: 800 13px/1 Arial, sans-serif;
}

.reading-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.09);
  direction: ltr;
}

.reading-progress i {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--cover-accent), #f6dfa0);
  box-shadow: 0 0 14px rgba(235, 204, 122, 0.32);
  transition: width 220ms ease;
}

.book-page {
  width: min(1160px, calc(100% - 38px));
  margin: auto;
  padding: 62px 0 100px;
}

.book-intro {
  display: grid;
  grid-template-columns: minmax(290px, 390px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(52px, 8vw, 112px);
  direction: ltr;
}

.book-intro-cover {
  position: relative;
  padding: 0 18px 24px 0;
}

.book-intro-cover::after {
  content: "";
  position: absolute;
  right: 9%;
  bottom: 0;
  width: 80%;
  height: 25px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(20, 35, 51, 0.25);
  filter: blur(15px);
}

.reader-cover {
  width: 100%;
}

.book-details {
  direction: rtl;
}

.book-label {
  color: var(--gold-dark);
  font: 800 8px/1.4 "Inter", Arial, sans-serif;
  letter-spacing: 1.7px;
  direction: ltr;
}

.book-details h1 {
  margin: 15px 0 5px;
  color: #172639;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: clamp(44px, 6.2vw, 74px);
  line-height: 1.55;
  text-wrap: balance;
}

.book-details h2 {
  margin: 0;
  color: #65717b;
  font-size: 15px;
  line-height: 2;
  font-weight: 600;
}

.book-details > p {
  max-width: 650px;
  margin: 24px 0 0;
  color: #475665;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: 17px;
  line-height: 2.15;
}

.book-details blockquote {
  max-width: 640px;
  margin: 25px 0 0;
  padding: 16px 20px 16px 6px;
  border-right: 3px solid var(--cover-accent);
  color: #354657;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: 16px;
  line-height: 2;
}

.book-by {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  direction: ltr;
}

.book-by small {
  color: #87919a;
  font: 700 7px/1.4 "Inter", Arial, sans-serif;
  letter-spacing: 0.8px;
}

.book-by b {
  color: #1d3045;
  font: 800 15px/1.4 "Inter", Arial, sans-serif;
}

.start-reading {
  width: min(345px, 100%);
  min-height: 60px;
  margin-top: 30px;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  color: white;
  background: linear-gradient(105deg, var(--cover-1), var(--cover-2));
  box-shadow: 0 17px 35px rgba(20, 45, 58, 0.22);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.start-reading i {
  color: var(--cover-accent);
  font: 800 18px/1 Arial, sans-serif;
  font-style: normal;
}

.table-of-contents {
  width: min(820px, 100%);
  margin: 100px auto 0;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.contents-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.contents-heading small {
  color: var(--gold-dark);
  font: 800 8px/1.4 "Inter", Arial, sans-serif;
  letter-spacing: 1.6px;
  direction: ltr;
}

.contents-heading h2 {
  margin: 7px 0 0;
  color: #1c2c3f;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: 38px;
  line-height: 1.6;
}

.contents-heading > b {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(24, 37, 54, 0.14);
  border-radius: 17px;
  color: var(--gold-dark);
  background: rgba(255, 253, 248, 0.72);
  font: 800 19px/1 "Inter", Arial, sans-serif;
}

.chapter-list {
  border-top: 1px solid var(--line);
}

.chapter-list a {
  min-height: 76px;
  padding: 13px 7px;
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: padding 170ms ease, background 170ms ease;
}

.chapter-list a:hover {
  padding-inline: 16px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.68);
}

.chapter-list a > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--cover-accent);
  background: var(--cover-1);
  font: 800 9px/1 "Inter", Arial, sans-serif;
  direction: ltr;
}

.chapter-list a b {
  min-width: 0;
  color: #29394a;
  font-size: 13px;
  line-height: 1.8;
}

.chapter-list a i {
  color: var(--gold-dark);
  font: 800 13px/1 Arial, sans-serif;
  font-style: normal;
}

.empty-content {
  padding: 56px 20px;
  border: 1px dashed rgba(24, 37, 54, 0.2);
  border-radius: 20px;
  text-align: center;
}

.empty-content p {
  color: var(--muted);
}

/* Swipe reader: two facing pages on desktop, one page on mobile */
.reader-body.is-reading {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10rem, rgba(216, 183, 100, 0.17), transparent 28rem),
    #d9d0c2;
}

.reader-app {
  height: calc(100dvh - 75px);
  min-height: 420px;
  overflow: hidden;
}

.reader-stage {
  position: relative;
  width: min(1460px, 100%);
  height: 100%;
  margin: auto;
  padding: 19px 22px 96px;
}

.chapter-deck {
  position: relative;
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(20, 33, 47, 0.14);
  border-radius: 22px;
  background: #f9f5ee;
  box-shadow:
    0 25px 60px rgba(20, 31, 42, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.9);
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  direction: rtl;
}

.chapter-deck::-webkit-scrollbar {
  display: none;
}

.reader-slide {
  position: relative;
  min-width: 0;
  height: 100%;
  flex: 0 0 50%;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: 1px solid rgba(80, 64, 40, 0.11);
  background: #fffdf8;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scrollbar-color: rgba(148, 114, 38, 0.35) transparent;
  scrollbar-width: thin;
  overscroll-behavior-y: contain;
  direction: rtl;
}

.reader-slide:nth-child(even) {
  background: #fdfaf4;
}

.reader-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(90, 72, 46, 0.018) 6px 7px),
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.85), transparent 20rem);
}

.reader-slide.is-active .paper {
  animation: page-settle 360ms ease both;
}

.paper {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: clamp(42px, 5.1vw, 74px) clamp(31px, 5.2vw, 78px) 70px;
}

.reading-kicker {
  color: var(--gold-dark);
  font: 800 8px/1.4 "Inter", Arial, sans-serif;
  letter-spacing: 1.7px;
  text-align: right;
  direction: ltr;
}

.paper > h1 {
  margin: 16px 0 30px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
  color: #17283c;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: clamp(29px, 3.2vw, 42px);
  line-height: 1.7;
  text-wrap: balance;
}

.book-content {
  color: #283a4b;
  font-family: "Noto Nastaliq Urdu", "Noto Sans Arabic", serif;
  font-size: clamp(17px, 1.58vw, 20px);
  line-height: 2.35;
}

.book-content p {
  margin: 0 0 1.3em;
}

.book-content h1,
.book-content h2 {
  margin: 1.65em 0 0.7em;
  color: var(--cover-1);
  font-size: 1.55em;
  line-height: 1.8;
}

.book-content h3 {
  margin: 1.55em 0 0.65em;
  color: var(--cover-1);
  font-size: 1.3em;
  line-height: 1.85;
}

.book-content h4 {
  margin: 1.45em 0 0.55em;
  color: #374d5a;
  font-size: 1.12em;
  line-height: 1.85;
}

.book-content blockquote {
  margin: 1.6em 0;
  padding: 19px 21px;
  border-right: 4px solid var(--cover-accent);
  border-radius: 14px 0 0 14px;
  color: #3c4c5b;
  background: #f2ece2;
}

.book-content ul,
.book-content ol {
  margin: 1.2em 0;
  padding-right: 1.4em;
}

.book-content li {
  margin: 0.48em 0;
}

.book-content strong,
.book-content b {
  color: #14283d;
}

.book-content hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.page-number {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #9b7c34;
  font: 700 8px/1.4 "Inter", Arial, sans-serif;
  text-align: center;
  letter-spacing: 1px;
}

.book-gutter {
  position: absolute;
  top: 19px;
  bottom: 96px;
  left: 50%;
  width: 28px;
  z-index: 8;
  pointer-events: none;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(52, 42, 29, 0.12), rgba(255, 255, 255, 0.65), rgba(52, 42, 29, 0.12), transparent);
  filter: blur(3px);
  opacity: 0.78;
}

.reader-dock {
  position: fixed;
  right: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 240;
  width: min(670px, calc(100% - 32px));
  min-height: 68px;
  padding: 8px;
  display: grid;
  grid-template-columns: 96px 82px minmax(150px, 1fr) 96px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(229, 203, 130, 0.24);
  border-radius: 19px;
  color: #eef2f3;
  background: rgba(6, 16, 25, 0.95);
  box-shadow: 0 17px 45px rgba(0, 0, 0, 0.33);
  backdrop-filter: blur(22px);
  transform: translateX(50%);
  direction: rtl;
}

.reader-dock button,
.reader-dock > a {
  min-height: 50px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  color: #e7ecef;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.reader-dock button.next {
  border-color: rgba(218, 184, 95, 0.5);
  color: var(--gold-light);
  background: rgba(218, 184, 95, 0.1);
}

.reader-dock button:disabled {
  cursor: default;
  opacity: 0.3;
}

.reader-dock button span,
.reader-dock > a span {
  color: var(--cover-accent);
  font: 800 15px/1 Arial, sans-serif;
}

.reader-dock button small,
.reader-dock > a small {
  font-size: 9px;
}

.swipe-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.swipe-copy b {
  color: var(--gold-light);
  font: 700 10px/1.2 "Inter", Arial, sans-serif;
  direction: ltr;
}

.swipe-copy small {
  overflow: hidden;
  color: #84939f;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-error {
  width: min(560px, calc(100% - 34px));
  min-height: 82vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.reader-error > span {
  color: #c2a759;
  font: 800 70px/1 "Inter", Arial, sans-serif;
  opacity: 0.34;
}

.reader-error h1 {
  margin: 18px 0 6px;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: 38px;
}

.reader-error p {
  color: var(--muted);
  line-height: 2;
}

.reader-error a {
  margin-top: 20px;
  padding: 13px 20px;
  border-radius: 13px;
  color: white;
  background: var(--night);
  text-decoration: none;
  font-weight: 800;
}

@keyframes page-settle {
  from {
    opacity: 0.78;
    transform: perspective(1000px) rotateY(-1.2deg) translateX(-4px);
  }
  to {
    opacity: 1;
    transform: perspective(1000px) rotateY(0) translateX(0);
  }
}

@media (max-width: 980px) {
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap-inline: 38px;
  }

  .collection-quote {
    order: 3;
  }

  .book-card {
    order: var(--mobile-order);
  }

  .book-intro {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 50px;
  }

  .reader-slide {
    flex-basis: 100%;
  }

  .book-gutter {
    display: none;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 80px;
  }

  .bar-inner {
    width: calc(100% - 24px);
    min-height: 70px;
    gap: 12px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 21px;
  }

  .brand-copy {
    gap: 4px;
  }

  .brand-copy b {
    font-size: 10px;
    letter-spacing: 2.1px;
  }

  .brand-copy small {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .book-total {
    min-height: 40px;
    padding: 7px 11px;
    gap: 7px;
  }

  .book-total b {
    font-size: 13px;
  }

  .book-total span {
    font-size: 7px;
    letter-spacing: 1px;
  }

  .search-toggle {
    width: 40px;
    height: 40px;
  }

  .search-toggle .search-glyph {
    width: 17px;
    height: 17px;
  }

  .search-drawer.is-open {
    max-height: 108px;
  }

  .search-inner {
    width: calc(100% - 24px);
    padding: 13px 0 16px;
    gap: 9px;
  }

  .library-search {
    min-height: 52px;
    padding: 6px 11px 6px 15px;
    gap: 11px;
  }

  .library-search input {
    font-size: 13px;
  }

  .search-result {
    min-width: 54px;
    font-size: 8px;
  }

  .collection-heading {
    width: calc(100% - 30px);
    padding: 24px 0 17px;
  }

  .collection-heading h1 {
    margin-top: 7px;
    font-size: 14px;
  }

  .collection-heading span {
    font-size: 7px;
    letter-spacing: 1.3px;
  }

  .book-gallery {
    width: calc(100% - 30px);
    padding: 18px 0 82px;
  }

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

  .book-card {
    width: min(100%, 430px);
    margin-inline: auto;
    order: var(--mobile-order);
  }

  .collection-quote {
    order: 2;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 26px 19px 23px;
    border-radius: 16px;
  }

  .collection-quote > span {
    height: 20px;
    font-size: 38px;
  }

  .collection-quote blockquote {
    font-size: 17px;
    line-height: 2.05;
  }

  .collection-quote cite {
    margin-top: 4px;
    font-size: 9px;
  }

  .premium-cover {
    padding: 27px 31px 25px 35px;
    border-radius: 16px 6px 6px 16px;
    box-shadow: 15px 23px 47px rgba(0, 0, 0, 0.43), inset -11px 0 20px rgba(0, 0, 0, 0.17);
  }

  .cover-spine {
    width: 19px;
  }

  .cover-head b,
  .cover-head i {
    font-size: 7.5px;
  }

  .cover-body strong {
    font-size: clamp(34px, 10.4vw, 46px);
  }

  .premium-cover.title-long .cover-body strong {
    font-size: clamp(30px, 9.2vw, 40px);
  }

  .premium-cover.title-xlong .cover-body strong {
    font-size: clamp(26px, 8vw, 35px);
  }

  .premium-cover.title-xxlong .cover-body strong {
    font-size: clamp(23px, 7.1vw, 31px);
  }

  .cover-body p {
    font-size: 10.5px;
  }

  .site-footer,
  .reader-footer {
    min-height: 180px;
  }

  .reader-bar-inner {
    width: calc(100% - 20px);
    min-height: 64px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
  }

  .reader-brand {
    gap: 7px;
  }

  .reader-brand .brand-mark {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
    font-size: 18px;
  }

  .reader-brand b {
    font-size: 8px;
    letter-spacing: 1.4px;
  }

  .reader-brand small {
    display: none;
  }

  .reader-book-title {
    font-size: 11px;
  }

  .reader-position {
    display: none;
  }

  .reader-back {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 8px;
  }

  .reader-back span {
    display: none;
  }

  .book-page {
    width: calc(100% - 28px);
    padding: 32px 0 80px;
  }

  .book-intro {
    display: flex;
    flex-direction: column;
    gap: 41px;
  }

  .book-intro-cover {
    width: min(100%, 410px);
    margin: auto;
  }

  .book-details {
    width: 100%;
  }

  .book-details h1 {
    font-size: 43px;
  }

  .book-details > p {
    font-size: 16px;
  }

  .start-reading {
    width: 100%;
  }

  .table-of-contents {
    margin-top: 64px;
    padding-top: 29px;
  }

  .contents-heading h2 {
    font-size: 32px;
  }

  .contents-heading > b {
    width: 54px;
    height: 54px;
  }

  .chapter-list a {
    grid-template-columns: 43px minmax(0, 1fr) 18px;
    gap: 11px;
  }

  .reader-app {
    height: calc(100dvh - 67px);
  }

  .reader-stage {
    padding: 0 0 83px;
  }

  .chapter-deck {
    border-inline: 0;
    border-bottom: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .reader-slide {
    border-left: 0;
  }

  .paper {
    padding: 34px 22px 70px;
  }

  .paper > h1 {
    margin-bottom: 26px;
    padding-bottom: 19px;
    font-size: 30px;
  }

  .book-content {
    font-size: 18px;
    line-height: 2.32;
  }

  .book-content blockquote {
    padding: 17px 18px;
  }

  .reader-dock {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    min-height: 66px;
    grid-template-columns: 67px 58px minmax(112px, 1fr) 67px;
    gap: 5px;
    border-radius: 17px;
  }

  .reader-dock button,
  .reader-dock > a {
    min-height: 48px;
    padding: 6px;
    gap: 5px;
    border-radius: 11px;
  }

  .reader-dock button small,
  .reader-dock > a small {
    font-size: 8px;
  }

  .swipe-copy small {
    font-size: 7px;
  }
}

@media (max-width: 390px) {
  .book-total span {
    display: none;
  }

  .book-total {
    min-width: 40px;
  }

  .brand-copy b {
    font-size: 9px;
    letter-spacing: 1.7px;
  }

  .search-result {
    display: none;
  }

  .reader-book-title {
    display: none;
  }

  .reader-bar-inner {
    grid-template-columns: 1fr auto;
  }

  .reader-dock {
    grid-template-columns: 58px 52px minmax(88px, 1fr) 58px;
  }

  .reader-dock button small,
  .reader-dock > a small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
