.atlas-library-page{
  min-height:70vh;
  padding:44px 0 84px;
  background:
    radial-gradient(circle at 12% 4%,rgba(66,105,255,.09),transparent 30%),
    radial-gradient(circle at 88% 8%,rgba(255,190,35,.10),transparent 27%),
    linear-gradient(180deg,#f8faff 0%,#fff 32%);
}
.atlas-library-loading{
  max-width:760px;
  margin:30px auto;
  padding:42px;
  text-align:center;
  border:1px solid rgba(7,27,85,.09);
  border-radius:26px;
  background:#fff;
  box-shadow:0 24px 65px rgba(7,27,85,.08);
}
.library-dashboard{max-width:1180px;margin:0 auto}
.library-hero{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(270px,.7fr);
  gap:24px;
  align-items:stretch;
  margin-bottom:22px;
}
.library-hero-main,.library-account-card{
  border:1px solid rgba(7,27,85,.09);
  border-radius:26px;
  background:rgba(255,255,255,.94);
  box-shadow:0 20px 55px rgba(7,27,85,.08);
}
.library-hero-main{padding:34px}
.library-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
  color:#8a6200;
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.library-kicker::before{
  content:"";
  width:8px;height:8px;border-radius:50%;
  background:#f4b400;
  box-shadow:0 0 0 5px rgba(244,180,0,.13);
}
.library-hero h1{
  margin:0 0 10px;
  color:#071b55;
  font-size:clamp(2.2rem,5vw,4.4rem);
  letter-spacing:-.045em;
  line-height:.98;
}
.library-hero-copy{
  max-width:720px;
  margin:0;
  color:#657390;
  font-size:1.04rem;
  line-height:1.7;
}
.library-progress-wrap{margin-top:26px}
.library-progress-top{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:end;
  margin-bottom:10px;
}
.library-progress-top span{color:#6d7890;font-size:.88rem;font-weight:700}
.library-progress-top strong{color:#071b55;font-size:1.15rem}
.library-progress{
  height:12px;
  overflow:hidden;
  border-radius:999px;
  background:#e8edf7;
}
.library-progress-fill{
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#ffbe23 0%,#ffdc67 38%,#3156d8 100%);
  box-shadow:0 0 18px rgba(49,86,216,.22);
  transition:width .45s ease;
}
.library-account-card{
  padding:24px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.library-account-label{
  color:#7b86a0;
  font-size:.75rem;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.library-account-email{
  display:block;
  margin:8px 0 18px;
  color:#071b55;
  font-weight:850;
  overflow-wrap:anywhere;
}
.library-account-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.library-signout{
  border:0;
  cursor:pointer;
}
.library-gift{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:center;
  margin:0 0 26px;
  padding:26px 28px;
  border:1px solid rgba(213,157,0,.35);
  border-radius:24px;
  background:
    radial-gradient(circle at 85% 15%,rgba(255,196,30,.28),transparent 25%),
    linear-gradient(120deg,#fff8dd 0%,#fffdf4 48%,#f3f0ff 100%);
  box-shadow:0 18px 44px rgba(149,105,0,.08);
}
.library-gift::after{
  content:"✦";
  position:absolute;
  right:18px;
  top:-24px;
  color:rgba(232,171,0,.15);
  font-size:9rem;
  line-height:1;
  pointer-events:none;
}
.library-gift-copy{position:relative;z-index:1}
.library-gift-kicker{
  display:block;
  margin-bottom:7px;
  color:#966800;
  font-size:.75rem;
  font-weight:900;
  letter-spacing:.11em;
}
.library-gift h2{
  margin:0 0 7px;
  color:#071b55;
  font-size:clamp(1.4rem,3vw,2rem);
}
.library-gift p{
  margin:0;
  color:#6d7890;
  line-height:1.6;
}
.library-gift-action{position:relative;z-index:1;white-space:nowrap}
.library-section-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:18px;
  margin:30px 0 16px;
}
.library-section-head h2{
  margin:0 0 5px;
  color:#071b55;
  font-size:clamp(1.55rem,3vw,2.15rem);
}
.library-section-head p{margin:0;color:#758099}
.library-count-chip{
  flex:0 0 auto;
  padding:8px 12px;
  border-radius:999px;
  background:#eef2ff;
  color:#2d4cc1;
  font-size:.8rem;
  font-weight:900;
}
.library-books-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:20px;
}
.library-book{
  min-width:0;
  border:1px solid rgba(7,27,85,.09);
  border-radius:22px;
  background:#fff;
  box-shadow:0 14px 36px rgba(7,27,85,.07);
  overflow:hidden;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.library-book:hover{
  transform:translateY(-5px);
  border-color:rgba(49,86,216,.24);
  box-shadow:0 24px 50px rgba(7,27,85,.12);
}
.library-cover-wrap{
  position:relative;
  aspect-ratio:4/5;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  overflow:hidden;
  background:
    radial-gradient(circle at top,#fff 0%,#f3f6ff 78%);
}
.library-cover-wrap::after{
  content:"";
  position:absolute;
  left:10%;right:10%;bottom:9px;
  height:16px;
  border-radius:50%;
  background:rgba(7,27,85,.10);
  filter:blur(8px);
}
.library-cover{
  position:relative;
  z-index:1;
  width:auto;
  height:100%;
  max-width:100%;
  object-fit:contain;
  border-radius:5px;
  box-shadow:0 13px 28px rgba(7,27,85,.20);
  transition:transform .22s ease;
}
.library-book:hover .library-cover{transform:scale(1.025)}
.library-owned-badge{
  position:absolute;
  z-index:2;
  top:12px;right:12px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:7px 9px;
  border-radius:999px;
  background:rgba(7,27,85,.93);
  color:#fff;
  font-size:.7rem;
  font-weight:900;
  box-shadow:0 6px 18px rgba(7,27,85,.18);
}
.library-book-body{padding:17px}
.library-volume{
  margin-bottom:6px;
  color:#7b86a0;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.10em;
}
.library-book h3{
  min-height:3.1em;
  margin:0 0 15px;
  color:#071b55;
  font-size:1rem;
  line-height:1.45;
}
.library-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.library-actions .btn{
  width:100%;
  justify-content:center;
  min-height:42px;
  padding:10px 12px;
}
.library-secure-note{
  margin-top:26px;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:14px;
  align-items:start;
  padding:20px 22px;
  border:1px solid rgba(7,27,85,.09);
  border-radius:18px;
  background:#f8faff;
}
.library-secure-icon{
  display:grid;
  place-items:center;
  width:38px;height:38px;
  border-radius:12px;
  background:#071b55;
  color:#fff;
}
.library-secure-note strong{display:block;color:#071b55;margin-bottom:4px}
.library-secure-note p{margin:0;color:#6d7890;line-height:1.6}
.library-empty{
  grid-column:1/-1;
  padding:38px;
  text-align:center;
  border:1px dashed #cfd8ea;
  border-radius:22px;
  background:#fff;
  color:#6d7890;
}
.library-action-busy{opacity:.65;pointer-events:none}

@media(max-width:1000px){
  .library-books-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:780px){
  .library-hero{grid-template-columns:1fr}
  .library-books-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .library-gift{grid-template-columns:1fr}
  .library-gift-action{justify-self:start}
}
@media(max-width:520px){
  .atlas-library-page{padding-top:24px}
  .library-hero-main{padding:24px}
  .library-books-grid{grid-template-columns:1fr 1fr;gap:12px}
  .library-cover-wrap{padding:10px}
  .library-book-body{padding:13px}
  .library-book h3{font-size:.9rem;min-height:4em}
  .library-actions .btn{font-size:.82rem}
}
@media(max-width:390px){
  .library-books-grid{grid-template-columns:1fr}
  .library-book h3{min-height:0}
}
