/* Book pages and book covers for kadambariworld.com (sizes in cqw scale with the page). */
/* "नवीनतम अङ्क" book on the home page (sizes in cqw so the text scales with the page) */
.hb-page { position: relative; overflow: hidden; background: #FFFDF7; container-type: inline-size; }
.hb-inner { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 7cqw 8cqw 4.5cqw; color: #0E2147; }
.hb-head { display: flex; justify-content: space-between; gap: 2cqw; padding-bottom: 1.6cqw; border-bottom: 1px solid rgba(200, 162, 74, .45); font-size: 3.3cqw; line-height: 1.4; color: #8A6D2B; }
.hb-genre { font-weight: 600; color: #006810; }
.hb-body { flex: 1; min-height: 0; overflow: hidden; padding-top: 5cqw; font-family: 'Noto Serif Devanagari', serif; font-size: 4.4cqw; line-height: 1.85; }
.hb-title { font-size: 7.2cqw; font-weight: 700; line-height: 1.3; color: #003070; }
.hb-writer { margin-top: 1.2cqw; font-size: 4cqw; font-weight: 600; color: #006810; }
.hb-orn { margin: 2.5cqw 0 3.5cqw; font-size: 3.2cqw; letter-spacing: .5em; color: #C8A24A; }
.hb-body p { margin: 0 0 2.6cqw; }
.hb-body .hb-line { margin: 0; }
.hb-body .hb-line.hb-stanza-end { margin-bottom: 2.6cqw; }
.hb-body h2, .hb-body h4, .hb-body h3:not(.hb-title) { margin: 3cqw 0 1.5cqw; font-weight: 700; line-height: 1.35; color: #003070; }
.hb-body blockquote { margin: 2cqw 0; padding-left: 3cqw; border-left: 2px solid #C8A24A; color: #3F5478; }
.hb-body ul, .hb-body ol { margin: 0 0 2.6cqw; padding-left: 5cqw; }
.hb-body ul { list-style: disc; } .hb-body ol { list-style: decimal; }
.hb-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 2cqw; font-size: 3.2cqw; color: #8A6D2B; }
.hb-num { display: grid; place-items: center; min-width: 6.5cqw; height: 6.5cqw; padding: 0 1cqw; border: 1px solid rgba(200, 162, 74, .6); border-radius: 999px; }
.hb-more a { font-weight: 600; color: #003070; } .hb-more a:hover { color: #006810; }
.hb-left::after, .hb-right::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8cqw; pointer-events: none; }
.hb-left::after { right: 0; background: linear-gradient(to left, rgba(59, 42, 10, .14), transparent); }
.hb-right::after { left: 0; background: linear-gradient(to right, rgba(59, 42, 10, .14), transparent); }
.hb-pdf { display: grid; place-items: center; background: #fff; }
.hb-pdf img { width: 100%; height: 100%; object-fit: contain; }
.hb-pdf:not(.is-ready)::before { content: ''; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #E3F3FC; border-top-color: #004088; animation: hb-spin .9s linear infinite; }
@keyframes hb-spin { to { transform: rotate(360deg); } }
.hb-blank { background: #FFFDF7 url("../assets/book-quill.png") center / 38% no-repeat; }
.hb-cover { overflow: hidden; }
.hb-toc-item[aria-current="true"] { background: #FBF3E1; box-shadow: inset 3px 0 0 #C8A24A; }
.hb-toc-item[aria-current="true"] .hb-toc-title { font-weight: 600; color: #003070; }
.kw-scroll { scrollbar-width: thin; scrollbar-color: #E2D3AC transparent; }
.kw-scroll::-webkit-scrollbar { width: 6px; }
.kw-scroll::-webkit-scrollbar-thumb { background: #E2D3AC; border-radius: 6px; }


/* ---------- लेख रचना संग्रह: one book per month, standing on a shelf ---------- */
.kb-shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
@media (min-width: 640px) { .kb-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .kb-shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kb-shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kb-item { margin: 0; }
.kb-slot { position: relative; padding: 0 14px 16px; }
.kb-slot::after { /* the wooden shelf the book stands on */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: linear-gradient(#D8B98A, #B48C57 55%, #8F6A3B); box-shadow: 0 8px 14px -6px rgba(60, 40, 10, .45);
}
.kb-book { display: block; width: 100%; perspective: 1000px; cursor: pointer; }
.kb-tilt {
  display: block; transform: rotateY(-9deg); transform-origin: left center; transition: transform .35s ease, filter .35s ease;
  filter: drop-shadow(10px 12px 10px rgba(30, 20, 5, .28));
}
.kb-book:hover .kb-tilt, .kb-book:focus-visible .kb-tilt { transform: rotateY(-20deg) translateY(-6px); filter: drop-shadow(16px 18px 14px rgba(30, 20, 5, .32)); }
.kb-book:focus-visible { outline: none; }
.kb-book:focus-visible .kb-tilt { outline: 3px solid #70C8F8; outline-offset: 4px; }

/* विषयसूची page inside a monthly book */
.hb-body .hb-toc-list { margin: 0; padding: 0; list-style: none; }
.hb-toc-list li + li { border-top: 1px dotted rgba(200, 162, 74, .5); }
.hb-toc-list button { display: flex; width: 100%; align-items: baseline; gap: 2cqw; padding: 1.3cqw 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.hb-toc-list button:hover .hb-toc-t { color: #006810; }
.hb-toc-n { flex: none; width: 7cqw; font-size: 3.6cqw; font-weight: 600; color: #8A6D2B; }
.hb-toc-t { flex: 1; min-width: 0; font-size: 3.9cqw; font-weight: 600; line-height: 1.38; color: #003070; }
.hb-toc-t small { display: block; font-size: 3.2cqw; font-weight: 400; line-height: 1.35; color: #3F5478; }
.hb-toc-p { flex: none; font-size: 3.5cqw; color: #8A6D2B; }
