.author-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}.author-card{display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #ddd;border-radius:10px;box-shadow:0 5px 18px rgba(0,0,0,.05)}.author-photo-link{display:block}.author-card img,.author-photo-placeholder{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;background:#eee}.author-card-body{display:flex;flex:1;flex-direction:column;padding:18px}.author-card h2{margin:0 0 8px;font-size:1.25rem}.author-card h2 a{color:inherit;text-decoration:none}.author-card h2 a:hover{text-decoration:underline}.author-card .credentials{margin:-2px 0 10px;color:#656970;font-size:.9rem}.author-card .button-row{margin-top:auto;padding-top:12px}

.author-dialog{width:min(92vw,820px);max-height:88vh;padding:0;border:0;border-radius:12px;box-shadow:0 24px 70px rgba(0,0,0,.28)}.author-dialog::backdrop{background:rgba(0,0,0,.58)}.author-dialog-inner{position:relative;padding:32px}.author-dialog-close{position:absolute;top:12px;right:14px;width:40px;height:40px;border:0;border-radius:50%;font-size:1.5rem;cursor:pointer}.author-dialog-head{display:grid;grid-template-columns:150px 1fr;gap:24px;align-items:start;margin-bottom:20px}.author-dialog-head img{width:150px;height:180px;object-fit:cover;border-radius:8px}.author-dialog h2{margin-top:0}.author-dialog h2 a{color:inherit;text-decoration:none}.author-dialog h2 a:hover{text-decoration:underline}.dialog-credentials{margin-top:-4px;color:#686d73}.author-dialog .bio p{margin:0 0 1rem}.author-dialog-actions{margin-top:22px}.author-links{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.author-links a:not(.btn){display:inline-block;padding:7px 10px;border:1px solid #ccc;border-radius:4px;text-decoration:none}

.author-dialog-books{margin-top:24px;padding-top:20px;border-top:1px solid #ddd}.author-dialog-books h3{margin:0 0 14px;font-size:1.08rem}.author-dialog-book-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.author-dialog-book{display:grid;grid-template-columns:54px 1fr;gap:10px;align-items:center}.author-dialog-book img{width:54px;height:72px;object-fit:contain;background:#f4f4f4}.author-dialog-book span{font-size:.92rem;line-height:1.3}

.author-back{margin-bottom:24px}.author-profile{display:grid;grid-template-columns:minmax(220px,320px) minmax(0,1fr);gap:42px;align-items:start}.author-profile-photo img{display:block;width:100%;max-width:320px;height:auto;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.08)}.author-profile-copy h1{margin-top:0}.author-profile-credentials{margin-top:-6px;color:#686d73;font-size:1.05rem}.author-bio p{margin:0 0 1.1rem}.author-books{margin-top:52px;padding-top:32px;border-top:1px solid #ddd}.author-book-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.author-book-card{display:grid;grid-template-columns:90px 1fr;gap:16px;align-items:start;padding:16px;border:1px solid #ddd;border-radius:8px;background:#fff}.author-book-card img{width:90px;height:120px;object-fit:contain;background:#f4f4f4}.author-book-card h3{margin:0 0 8px;font-size:1.05rem}.author-book-card p{margin:0 0 6px}.book-role{color:#686d73;font-size:.9rem}

@media(max-width:950px){.author-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.author-book-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.author-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.author-dialog-head{grid-template-columns:110px 1fr}.author-dialog-head img{width:110px;height:135px}.author-dialog-book-grid{grid-template-columns:1fr}.author-profile{grid-template-columns:1fr}.author-profile-photo img{max-width:260px}.author-book-grid{grid-template-columns:1fr}}@media(max-width:500px){.author-grid{grid-template-columns:1fr}.author-dialog-inner{padding:24px 18px}.author-dialog-head{grid-template-columns:1fr}.author-dialog-head img{width:130px;height:155px}}

.author-dialog-book{text-decoration:none;color:inherit}.author-dialog-book:hover span{text-decoration:underline}.author-book-cover{display:block}.author-book-card h3 a{color:inherit;text-decoration:none}.author-book-card h3 a:hover{text-decoration:underline}


/* ============================================================
   AUTHOR IMAGE STANDARDIZATION v4
   Uploaded source dimensions no longer control public display size.
   ============================================================ */

/* Full author profile headshot: same visual frame for every author. */
.author-profile-photo{
  width:280px;
  max-width:100%;
}

.author-profile-photo img{
  display:block !important;
  width:280px !important;
  height:340px !important;
  max-width:100% !important;
  object-fit:cover !important;
  object-position:center top;
  border-radius:10px;
  background:#eee;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}

/* Give every book on an author profile the same cover canvas. */
.author-book-card{
  grid-template-columns:100px minmax(0,1fr) !important;
  min-height:172px;
}

.author-book-cover{
  display:grid !important;
  place-items:center;
  width:100px !important;
  height:145px !important;
  overflow:hidden;
  background:#f5f5f3;
  border-radius:4px;
}

.author-book-cover img,
.author-book-card > img{
  display:block !important;
  width:100px !important;
  height:145px !important;
  max-width:100px !important;
  max-height:145px !important;
  object-fit:contain !important;
  object-position:center;
  background:#f5f5f3;
}

/* Quick-bio modal images also remain uniform. */
.author-dialog-head img{
  width:150px !important;
  height:180px !important;
  max-width:150px !important;
  object-fit:cover !important;
  object-position:center top;
}

.author-dialog-book{
  grid-template-columns:54px minmax(0,1fr) !important;
}

.author-dialog-book img{
  width:54px !important;
  height:76px !important;
  max-width:54px !important;
  max-height:76px !important;
  object-fit:contain !important;
}

/* The Authors directory already uses square cards; reinforce that rule
   against unusually large or oddly shaped uploads. */
.author-card img,
.author-photo-placeholder{
  width:100% !important;
  aspect-ratio:1 / 1 !important;
  height:auto !important;
  object-fit:cover !important;
  object-position:center top;
}

@media(max-width:720px){
  .author-profile-photo{
    width:240px;
  }

  .author-profile-photo img{
    width:240px !important;
    height:292px !important;
  }

  .author-book-card{
    grid-template-columns:90px minmax(0,1fr) !important;
  }

  .author-book-cover,
  .author-book-cover img,
  .author-book-card > img{
    width:90px !important;
  }

  .author-book-cover,
  .author-book-cover img,
  .author-book-card > img{
    height:132px !important;
    max-width:90px !important;
    max-height:132px !important;
  }
}

@media(max-width:500px){
  .author-profile-photo{
    width:220px;
  }

  .author-profile-photo img{
    width:220px !important;
    height:268px !important;
  }
}
