/**
 * Jarayan psychology library.
 */

.jarayan-library-page,
.jarayan-book-single {
  overflow: clip;
}

.jarayan-library-hero {
  position: relative;
  padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  background:
    radial-gradient(circle at 12% 15%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 35%),
    linear-gradient(135deg, color-mix(in srgb, var(--ink) 96%, #24415a), var(--ink));
  color: #fff;
  isolation: isolate;
}

.jarayan-library-hero__texture,
.jarayan-library-hero__texture::before,
.jarayan-library-hero__texture::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.jarayan-library-hero__texture {
  z-index: -1;
  opacity: .42;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 54px 54px;
}

.jarayan-library-hero__texture::before {
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  transform: translateX(-70%);
  animation: jarayanLibraryLight 11s ease-in-out infinite;
}

.jarayan-library-hero__texture span {
  position: absolute;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
}

.jarayan-library-hero__texture span:nth-child(1) { width: 380px; height: 380px; inset: -150px auto auto -90px; }
.jarayan-library-hero__texture span:nth-child(2) { width: 170px; height: 170px; inset: auto 9% 8% auto; }
.jarayan-library-hero__texture span:nth-child(3) { width: 18px; height: 18px; inset: 20% 48% auto auto; background: var(--accent); border: 0; box-shadow: 0 0 35px color-mix(in srgb, var(--accent) 75%, transparent); }

@keyframes jarayanLibraryLight {
  0%,100% { transform: translateX(-70%); opacity: .15; }
  50% { transform: translateX(70%); opacity: .5; }
}

.jarayan-library-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.jarayan-library-hero .eyebrow {
  color: #bde9ff;
}

.jarayan-library-hero h1 {
  max-width: 790px;
  margin: .75rem 0 1rem;
  font-size: clamp(2.35rem, 5.7vw, 5.3rem);
  line-height: 1.12;
  letter-spacing: -.055em;
  color: #fff;
}

.jarayan-library-hero__copy > p {
  max-width: 720px;
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 2;
}

.jarayan-library-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 2rem;
}

.jarayan-library-hero__stats > div {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 20px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(12px);
}

.jarayan-library-hero__stats strong,
.jarayan-library-hero__stats span {
  display: block;
}

.jarayan-library-hero__stats strong {
  font-size: 1.15rem;
  color: #fff;
}

.jarayan-library-hero__stats span {
  margin-top: .3rem;
  color: rgba(255,255,255,.62);
  font-size: .78rem;
}

.jarayan-library-feature {
  position: relative;
  display: grid;
  grid-template-columns: 145px minmax(0,1fr);
  align-items: end;
  gap: 1.25rem;
  min-height: 365px;
  padding: 1.65rem;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035));
  box-shadow: 0 35px 70px rgba(0,0,0,.28);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
}

.jarayan-library-feature::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  inset: -70px -80px auto auto;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--book-to) 62%, transparent), transparent 69%);
  opacity: .7;
}

.jarayan-library-feature__label {
  position: absolute;
  inset: 1rem 1rem auto auto;
  z-index: 2;
  padding: .48rem .8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #e7f8ff;
  font-size: .78rem;
}

.jarayan-library-feature__book {
  position: relative;
  z-index: 1;
  display: grid;
  width: 145px;
  aspect-ratio: .66;
  border-radius: 8px 16px 16px 8px;
  background: linear-gradient(145deg, var(--book-from), var(--book-to));
  box-shadow: -14px 20px 26px rgba(0,0,0,.35), inset 8px 0 10px rgba(255,255,255,.08), inset -3px 0 8px rgba(0,0,0,.25);
  transform: perspective(850px) rotateY(-9deg) rotateZ(-1.2deg);
  overflow: hidden;
}

.jarayan-library-feature__book::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 9px;
  z-index: 2;
  background: rgba(255,255,255,.16);
  box-shadow: 4px 0 10px rgba(0,0,0,.18);
}

.jarayan-library-feature__book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jarayan-library-feature__book > span {
  display: flex;
  min-height: 100%;
  padding: 1.4rem 1rem;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.jarayan-library-feature__book svg { width: 30px; height: 30px; opacity: .72; }
.jarayan-library-feature__book b { font-size: 1.02rem; line-height: 1.65; }
.jarayan-library-feature__book small { color: rgba(255,255,255,.68); }

.jarayan-library-feature__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .38rem;
  padding-bottom: .3rem;
}

.jarayan-library-feature__copy small { color: #9ee0ff; }
.jarayan-library-feature__copy strong { font-size: clamp(1.25rem, 2vw, 1.8rem); line-height: 1.55; }
.jarayan-library-feature__copy em { color: rgba(255,255,255,.62); font-style: normal; }
.jarayan-library-feature__copy b { display: inline-flex; gap: .45rem; align-items: center; margin-top: .75rem; font-size: .86rem; }
.jarayan-library-feature__copy svg { width: 17px; height: 17px; }

.jarayan-library-catalog {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--soft) 75%, #fff), #fff 25%),
    #fff;
}

.jarayan-library-toolbar {
  display: grid;
  grid-template-columns: minmax(260px,.75fr) minmax(0,1.25fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2.2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 44px rgba(16,33,47,.065);
}

.jarayan-library-search {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 50px;
  padding: 0 .9rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--soft);
}

.jarayan-library-search svg { width: 19px; height: 19px; color: var(--accent); }
.jarayan-library-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }

.jarayan-library-filters {
  display: flex;
  gap: .55rem;
  align-items: center;
  overflow-x: auto;
  padding: .1rem 0;
  scrollbar-width: thin;
}

.jarayan-library-filters button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 42px;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: .22s ease;
}

.jarayan-library-filters button small {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--soft);
  font-size: .7rem;
}

.jarayan-library-filters button:hover,
.jarayan-library-filters button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.jarayan-library-filters button.is-active small { background: rgba(255,255,255,.18); color: #fff; }
.jarayan-library-toolbar__result { white-space: nowrap; color: var(--muted); font-size: .8rem; }
.jarayan-library-toolbar__result span { color: var(--ink); font-weight: 800; }

.jarayan-bookshelves {
  display: grid;
  gap: clamp(2.6rem, 5vw, 4.5rem);
}

.jarayan-bookshelf {
  position: relative;
  padding: 0 clamp(1rem, 2.6vw, 2.2rem) 30px;
}

.jarayan-bookshelf[hidden] { display: none !important; }

.jarayan-bookshelf__books {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: clamp(.65rem, 1.7vw, 1.35rem);
  align-items: end;
  min-height: 330px;
}

.jarayan-bookshelf__wood {
  position: absolute;
  inset: auto 0 0;
  height: 34px;
  border-radius: 7px 7px 15px 15px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.32), transparent 22%),
    repeating-linear-gradient(92deg, rgba(72,37,19,.08) 0 8px, rgba(255,255,255,.04) 8px 14px),
    linear-gradient(180deg, #b97c4f, #7e482c);
  box-shadow: 0 15px 22px rgba(58,31,17,.25), inset 0 -7px 0 rgba(66,35,20,.24);
}

.jarayan-bookshelf__wood::after {
  content: "";
  position: absolute;
  inset: auto 4% -17px;
  height: 18px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #704029, #4f2e20);
  box-shadow: 0 9px 14px rgba(44,24,14,.16);
}

.jarayan-book-card {
  position: relative;
  min-width: 0;
  transition: opacity .2s ease, transform .28s ease;
}

.jarayan-book-card[hidden] { display: none !important; }

.jarayan-book-card__link {
  display: grid;
  grid-template-rows: 255px auto;
  gap: .82rem;
  color: inherit;
  text-decoration: none;
}

.jarayan-book-card__cover {
  position: relative;
  display: block;
  width: min(100%, 165px);
  height: 255px;
  justify-self: center;
  border-radius: 6px 14px 14px 6px;
  background: linear-gradient(150deg, var(--book-from), var(--book-to));
  box-shadow: -11px 15px 22px rgba(25,29,33,.22), inset 7px 0 7px rgba(255,255,255,.12), inset -2px 0 5px rgba(0,0,0,.2);
  overflow: hidden;
  transform-origin: center bottom;
  transform: perspective(850px) rotateY(-3deg);
  transition: transform .28s ease, box-shadow .28s ease;
}

.jarayan-book-card__cover::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0 auto 0 0;
  width: 7px;
  background: rgba(255,255,255,.14);
  box-shadow: 3px 0 8px rgba(0,0,0,.16);
}

.jarayan-book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jarayan-book-card__fallback {
  display: flex;
  height: 100%;
  padding: 1.2rem .8rem;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  text-align: center;
}

.jarayan-book-card__fallback i { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(255,255,255,.08); }
.jarayan-book-card__fallback svg { width: 23px; height: 23px; }
.jarayan-book-card__fallback b { font-size: clamp(.82rem,1.15vw,1.02rem); line-height: 1.75; }
.jarayan-book-card__fallback small { color: rgba(255,255,255,.66); font-size: .72rem; }

.jarayan-book-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.18) 48%, transparent 60%);
  transform: translateX(120%);
  transition: transform .55s ease;
}

.jarayan-book-card__meta { display: block; text-align: center; min-width: 0; }
.jarayan-book-card__meta small { display: inline-block; margin-bottom: .3rem; color: var(--accent); font-size: .68rem; font-weight: 700; }
.jarayan-book-card__meta strong,
.jarayan-book-card__meta span { display: block; }
.jarayan-book-card__meta strong { color: var(--ink); font-size: .94rem; line-height: 1.55; }
.jarayan-book-card__meta span { margin-top: .23rem; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jarayan-book-card__volume { display: none; }

@media (hover:hover) {
  .jarayan-book-card__link:hover .jarayan-book-card__cover { transform: perspective(850px) rotateY(-8deg) translateY(-8px); box-shadow: -16px 22px 30px rgba(25,29,33,.27), inset 7px 0 7px rgba(255,255,255,.12), inset -2px 0 5px rgba(0,0,0,.2); }
  .jarayan-book-card__link:hover .jarayan-book-card__shine { transform: translateX(-120%); }
  .jarayan-library-feature:hover .jarayan-library-feature__book { transform: perspective(850px) rotateY(-3deg) translateY(-6px); }
}

.jarayan-library-empty {
  max-width: 720px;
  margin: 3rem auto;
  padding: 3rem;
  border: 1px dashed color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 28px;
  background: color-mix(in srgb, var(--soft) 75%, #fff);
  text-align: center;
}

.jarayan-library-empty > span { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 1rem; border-radius: 22px; background: #fff; color: var(--accent); box-shadow: 0 12px 30px rgba(16,33,47,.08); }
.jarayan-library-empty svg { width: 30px; height: 30px; }
.jarayan-library-empty h2 { margin: 0 0 .5rem; color: var(--ink); }
.jarayan-library-empty p { margin: 0; color: var(--muted); }

.jarayan-library-note {
  padding: 0 0 clamp(3.5rem,7vw,6rem);
  background: #fff;
}

.jarayan-library-note .container > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: clamp(1.3rem,3vw,2rem);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--ink), color-mix(in srgb, var(--ink) 86%, var(--accent)));
  color: #fff;
}

.jarayan-library-note .container > div > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: rgba(255,255,255,.1); color: #8ed9ff; }
.jarayan-library-note svg { width: 25px; height: 25px; }
.jarayan-library-note h2 { margin: 0 0 .35rem; color: #fff; font-size: clamp(1.1rem,2vw,1.55rem); }
.jarayan-library-note p { margin: 0; color: rgba(255,255,255,.66); font-size: .88rem; }

/* Home shelf */
.jarayan-home-library {
  position: relative;
  padding: clamp(3.2rem,6vw,5.4rem) 0;
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--soft) 58%, #fff));
}

.jarayan-home-library__shelf {
  position: relative;
  margin-top: 2rem;
  padding: 1.4rem 1.4rem 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0, color-mix(in srgb, var(--accent) 9%, transparent), transparent 35%),
    rgba(255,255,255,.76);
  box-shadow: 0 28px 60px rgba(16,33,47,.075);
}

.jarayan-home-library__books {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: clamp(.65rem,1.8vw,1.4rem);
  align-items: end;
}

.jarayan-home-library__shelf::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34px;
  border-radius: 0 0 29px 29px;
  background: linear-gradient(180deg, #ba7c50, #70402a);
  box-shadow: inset 0 -8px 0 rgba(54,28,15,.22), 0 14px 22px rgba(65,34,18,.18);
}

.jarayan-home-library .jarayan-book-card__link { grid-template-rows: 230px auto; }
.jarayan-home-library .jarayan-book-card__cover { height: 230px; width: min(100%,150px); }

/* Single book */
.jarayan-book-hero {
  position: relative;
  padding: clamp(4.5rem,8vw,7rem) 0 clamp(3.5rem,6vw,5rem);
  background: linear-gradient(135deg, color-mix(in srgb, var(--soft) 84%, #fff), #fff);
}

.jarayan-book-hero__wash {
  position: absolute;
  width: 560px;
  height: 560px;
  inset: -250px auto auto -120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--book-to) 24%, transparent), transparent 68%);
  pointer-events: none;
}

.jarayan-book-hero__grid {
  display: grid;
  grid-template-columns: minmax(260px,.72fr) minmax(0,1.28fr);
  gap: clamp(2.5rem,7vw,7rem);
  align-items: center;
}

.jarayan-book-hero__cover { position: relative; display: grid; place-items: center; min-height: 480px; }
.jarayan-book-hero__book { position: relative; z-index: 2; display: grid; width: min(330px,85%); aspect-ratio: .68; border-radius: 10px 24px 24px 10px; background: linear-gradient(145deg,var(--book-from),var(--book-to)); box-shadow: -24px 34px 50px rgba(21,27,32,.28), inset 12px 0 14px rgba(255,255,255,.1), inset -4px 0 10px rgba(0,0,0,.22); transform: perspective(1000px) rotateY(-8deg); overflow: hidden; }
.jarayan-book-hero__book::before { content:""; position:absolute; inset:0 auto 0 0; z-index:3; width:13px; background:rgba(255,255,255,.16); box-shadow:5px 0 12px rgba(0,0,0,.19); }
.jarayan-book-hero__book img { width:100%; height:100%; object-fit:cover; }
.jarayan-book-hero__book > span { display:flex; height:100%; padding:2.2rem 1.4rem; flex-direction:column; justify-content:space-between; align-items:center; text-align:center; color:#fff; }
.jarayan-book-hero__book > span i { display:grid; place-items:center; width:72px; height:72px; border:1px solid rgba(255,255,255,.22); border-radius:50%; background:rgba(255,255,255,.08); }
.jarayan-book-hero__book > span svg { width:34px; height:34px; }
.jarayan-book-hero__book > span b { font-size:clamp(1.35rem,2.5vw,2rem); line-height:1.65; }
.jarayan-book-hero__book > span small { color:rgba(255,255,255,.68); }
.jarayan-book-hero__shadow { position:absolute; z-index:1; inset:auto 15% 3%; height:45px; border-radius:50%; background:rgba(17,25,31,.22); filter:blur(20px); }

.jarayan-book-back { display:inline-flex; gap:.45rem; align-items:center; margin-bottom:1.3rem; color:var(--muted); text-decoration:none; font-size:.86rem; }
.jarayan-book-back svg { width:17px; height:17px; }
.jarayan-book-topics { display:flex; flex-wrap:wrap; gap:.45rem; }
.jarayan-book-topics a { padding:.45rem .72rem; border-radius:999px; background:color-mix(in srgb,var(--book-to) 10%,#fff); color:var(--book-from); text-decoration:none; font-size:.75rem; font-weight:700; }
.jarayan-book-hero__content h1 { margin:1rem 0 .55rem; color:var(--ink); font-size:clamp(2.25rem,5vw,4.8rem); line-height:1.15; letter-spacing:-.055em; }
.jarayan-book-author { margin:0; color:var(--muted); }
.jarayan-book-lead { max-width:760px; margin:1.35rem 0 0; color:var(--muted); font-size:1.04rem; line-height:2; }
.jarayan-book-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.75rem; margin-top:1.7rem; }
.jarayan-book-facts > div { display:grid; grid-template-columns:auto 1fr; column-gap:.65rem; padding:.85rem; border:1px solid var(--line); border-radius:18px; background:#fff; }
.jarayan-book-facts > div > span { grid-row:1 / 3; display:grid; place-items:center; width:42px; height:42px; border-radius:14px; background:var(--soft); color:var(--accent); }
.jarayan-book-facts svg { width:21px; height:21px; }
.jarayan-book-facts small { color:var(--muted); font-size:.7rem; }
.jarayan-book-facts strong { color:var(--ink); font-size:.83rem; }
.jarayan-book-actions { display:flex; flex-wrap:wrap; gap:.7rem; margin-top:1.8rem; }

.jarayan-book-body { padding:clamp(3rem,6vw,5rem) 0; background:#fff; }
.jarayan-book-body__grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr); gap:clamp(2rem,5vw,5rem); align-items:start; }
.jarayan-book-article { color:var(--muted); line-height:2.05; }
.jarayan-book-article h2 { margin:2.2rem 0 .7rem; color:var(--ink); font-size:clamp(1.35rem,2.4vw,2rem); }
.jarayan-book-article > section:first-child h2 { margin-top:0; }
.jarayan-book-highlight { display:grid; grid-template-columns:auto 1fr; gap:1rem; padding:clamp(1.25rem,3vw,2rem); border:1px solid color-mix(in srgb,var(--book-to) 26%,var(--line)); border-radius:26px; background:linear-gradient(135deg,color-mix(in srgb,var(--book-to) 9%,#fff),#fff); }
.jarayan-book-highlight > span { display:grid; place-items:center; width:54px; height:54px; border-radius:18px; background:linear-gradient(145deg,var(--book-from),var(--book-to)); color:#fff; }
.jarayan-book-highlight svg { width:25px; height:25px; }
.jarayan-book-highlight h2 { margin:0 0 .5rem; }
.jarayan-book-highlight p { margin:0; }
.jarayan-book-sidebar { display:grid; gap:1rem; position:sticky; top:110px; }
.jarayan-book-info-card,.jarayan-book-disclaimer { padding:1.3rem; border:1px solid var(--line); border-radius:24px; background:color-mix(in srgb,var(--soft) 55%,#fff); }
.jarayan-book-info-card h2 { margin:0 0 .8rem; color:var(--ink); font-size:1.05rem; }
.jarayan-book-info-card dl { margin:0; }
.jarayan-book-info-card dl div { display:grid; grid-template-columns:.75fr 1.25fr; gap:.8rem; padding:.7rem 0; border-bottom:1px dashed var(--line); }
.jarayan-book-info-card dl div:last-child { border-bottom:0; }
.jarayan-book-info-card dt { color:var(--muted); font-size:.78rem; }
.jarayan-book-info-card dd { margin:0; color:var(--ink); font-weight:700; font-size:.82rem; text-align:left; }
.jarayan-book-disclaimer { display:grid; grid-template-columns:auto 1fr; gap:.75rem; background:#fff8e8; border-color:#f0dba9; }
.jarayan-book-disclaimer > span { color:#a57922; }
.jarayan-book-disclaimer svg { width:24px; height:24px; }
.jarayan-book-disclaimer p { margin:0; color:#725b2d; font-size:.79rem; line-height:1.85; }
.jarayan-related-books { padding:clamp(3rem,6vw,5rem) 0; background:color-mix(in srgb,var(--soft) 62%,#fff); }
.jarayan-related-books__grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; margin-top:2rem; }

@media (max-width: 1100px) {
  .jarayan-library-hero__grid { grid-template-columns: minmax(0,1fr) 360px; gap:2rem; }
  .jarayan-library-toolbar { grid-template-columns: 1fr; }
  .jarayan-library-toolbar__result { justify-self:end; }
  .jarayan-bookshelf__books { grid-template-columns:repeat(3,minmax(0,1fr)); row-gap:2rem; }
  .jarayan-bookshelf__books .jarayan-book-card:nth-child(n+4) { margin-top:1rem; }
  .jarayan-home-library__books { grid-template-columns:repeat(3,minmax(0,1fr)); row-gap:2rem; }
  .jarayan-related-books__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .jarayan-library-hero { padding-top:4rem; }
  .jarayan-library-hero__grid { grid-template-columns:1fr; }
  .jarayan-library-feature { max-width:570px; }
  .jarayan-library-hero__stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .jarayan-book-hero__grid,.jarayan-book-body__grid { grid-template-columns:1fr; }
  .jarayan-book-hero__cover { min-height:390px; }
  .jarayan-book-hero__book { width:min(260px,75%); }
  .jarayan-book-sidebar { position:static; }
  .jarayan-related-books__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .jarayan-library-note .container > div { grid-template-columns:auto 1fr; }
  .jarayan-library-note .button { grid-column:1 / -1; justify-self:stretch; }
}

@media (max-width: 620px) {
  .jarayan-library-hero h1 { font-size:clamp(2.15rem,10vw,3.2rem); }
  .jarayan-library-hero__stats { grid-template-columns:1fr; }
  .jarayan-library-hero__stats > div { display:grid; grid-template-columns:auto 1fr; gap:.6rem; align-items:center; }
  .jarayan-library-hero__stats span { margin:0; }
  .jarayan-library-feature { grid-template-columns:112px minmax(0,1fr); min-height:300px; padding:1.15rem; border-radius:26px; }
  .jarayan-library-feature__book { width:112px; }
  .jarayan-library-feature__copy strong { font-size:1.05rem; }
  .jarayan-library-toolbar { padding:.75rem; border-radius:20px; }
  .jarayan-library-toolbar__result { justify-self:start; }
  .jarayan-bookshelf { padding:0 .55rem 25px; }
  .jarayan-bookshelf__books { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem .65rem; min-height:0; }
  .jarayan-book-card__link,.jarayan-home-library .jarayan-book-card__link { grid-template-rows:210px auto; }
  .jarayan-book-card__cover,.jarayan-home-library .jarayan-book-card__cover { height:210px; width:min(100%,138px); }
  .jarayan-book-card__meta strong { font-size:.84rem; }
  .jarayan-home-library__shelf { padding:1rem .65rem 30px; }
  .jarayan-home-library__books { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem .65rem; }
  .jarayan-book-hero { padding-top:3.6rem; }
  .jarayan-book-hero__cover { min-height:330px; }
  .jarayan-book-hero__book { width:min(220px,72%); }
  .jarayan-book-facts { grid-template-columns:1fr; }
  .jarayan-book-actions { display:grid; grid-template-columns:1fr; }
  .jarayan-book-actions .button { width:100%; }
  .jarayan-book-highlight { grid-template-columns:1fr; }
  .jarayan-book-highlight > span { width:48px; height:48px; }
  .jarayan-related-books__grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; }
  .jarayan-library-note .container > div { grid-template-columns:1fr; text-align:center; }
  .jarayan-library-note .container > div > span { margin:auto; }
}

@media (max-width: 360px) {
  .jarayan-library-feature { grid-template-columns:95px minmax(0,1fr); }
  .jarayan-library-feature__book { width:95px; }
  .jarayan-book-card__link,.jarayan-home-library .jarayan-book-card__link { grid-template-rows:185px auto; }
  .jarayan-book-card__cover,.jarayan-home-library .jarayan-book-card__cover { height:185px; width:min(100%,122px); }
}

@media (prefers-reduced-motion: reduce) {
  .jarayan-library-hero__texture::before { animation:none; }
  .jarayan-book-card__cover,.jarayan-book-card__shine,.jarayan-library-feature__book { transition:none; }
}

@supports not (backdrop-filter: blur(1px)) {
  .jarayan-library-hero__stats > div { background:rgba(255,255,255,.1); }
}

/* ===== Jarayan 8.8 library layout refinement ===== */
.jarayan-library-catalog>.container{max-width:1440px}
.jarayan-bookshelves--4 .jarayan-bookshelf__books{grid-template-columns:repeat(4,minmax(0,1fr))}
.jarayan-bookshelves--5 .jarayan-bookshelf__books{grid-template-columns:repeat(5,minmax(0,1fr))}
.jarayan-bookshelves--6 .jarayan-bookshelf__books{grid-template-columns:repeat(6,minmax(0,1fr))}
.jarayan-bookshelf{padding-inline:clamp(.75rem,2vw,1.6rem)}
.jarayan-bookshelf__books{min-height:0;align-items:stretch}
.jarayan-book-card{height:100%}.jarayan-book-card__link{height:100%;grid-template-rows:minmax(245px,310px) 1fr}.jarayan-book-card__meta{display:flex;flex-direction:column}.jarayan-book-card__more{margin-top:auto}
.jarayan-library-toolbar{position:sticky;top:calc(var(--admin-bar-offset,0px) + 86px);z-index:12;box-shadow:0 18px 45px rgba(7,28,43,.08);backdrop-filter:blur(18px)}
.jarayan-library-path{height:100%}.jarayan-library-path p{max-width:36ch}
@media(max-width:1200px){.jarayan-bookshelves--4 .jarayan-bookshelf__books,.jarayan-bookshelves--5 .jarayan-bookshelf__books,.jarayan-bookshelves--6 .jarayan-bookshelf__books{grid-template-columns:repeat(3,minmax(0,1fr))}.jarayan-library-toolbar{position:relative;top:auto}}
@media(max-width:700px){.jarayan-bookshelves--4 .jarayan-bookshelf__books,.jarayan-bookshelves--5 .jarayan-bookshelf__books,.jarayan-bookshelves--6 .jarayan-bookshelf__books{grid-template-columns:repeat(2,minmax(0,1fr))}.jarayan-book-card__link{grid-template-rows:210px 1fr}}
@media(max-width:420px){.jarayan-bookshelf__books{grid-template-columns:1fr!important}.jarayan-book-card__link{grid-template-columns:112px 1fr;grid-template-rows:auto;align-items:stretch}.jarayan-book-card__cover{height:180px!important;width:112px!important}.jarayan-book-card__meta{padding:12px}.jarayan-book-card__meta p{display:none}}
