/* Unified story cards: the image has its own column, never sits behind text. */
.bookish-world .bookish-story-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:20px;
}
.bookish-world .bookish-story-card{
  display:grid;
  grid-template-columns:clamp(200px,30%,285px) minmax(0,1fr);
  position:relative;
  isolation:isolate;
  align-items:stretch;
  min-height:215px;
  overflow:hidden;
  background:#fffefa;
}
.bookish-world .bookish-story-card .bookish-story-art{
  position:relative;
  inset:auto;
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  min-height:215px;
  overflow:hidden;
  padding:15px;
  background:linear-gradient(145deg,#fff0e1,#f9e4ec);
}
.bookish-world .bookish-story-card .bookish-story-art.with-photo{padding:14px}
.bookish-world .bookish-story-card .bookish-story-art img{
  display:block;
  max-height:255px;
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:12px;
}
.bookish-world .bookish-story-card .bookish-story-content{
  position:relative;
  inset:auto;
  width:100%;
  min-width:0;
  z-index:1;
  padding:25px clamp(19px,3vw,33px);
  background:#fffefa;
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:left;
}
.bookish-world .bookish-story-card .bookish-story-content h3{margin:10px 0 10px}
.bookish-world .bookish-story-card .bookish-story-content>p{margin:0 0 16px;min-height:0}
.bookish-world .bookish-story-card .bookish-story-footer{margin-top:auto}
.bookish-world .bookish-story-card .bookish-link-pill{align-self:flex-start}
@media(max-width:680px){
  .bookish-world .bookish-story-card{grid-template-columns:minmax(0,1fr)}
  .bookish-world .bookish-story-card .bookish-story-art{min-height:185px;height:210px}
  .bookish-world .bookish-story-card .bookish-story-art img{max-height:185px}
  .bookish-world .bookish-story-card .bookish-story-content{padding:21px}
}

.bookish-world .bookish-story-art .bookish-story-image-link{
  display:grid;place-items:center;width:100%;height:100%;
  color:inherit;text-decoration:none;
}
.bookish-world .bookish-story-image-link:focus-visible{outline:3px solid #216d94;outline-offset:3px}
.bookish-world .bookish-story-card .bookish-card-reactions{
  display:flex;flex-wrap:wrap;gap:9px;color:#925175;
  font:750 .83rem/1.45 system-ui,sans-serif;margin:10px 0 13px;
}
.bookish-live-reactions{display:block!important;border:1px solid #efcddd;border-radius:20px;background:#fffbf7;padding:19px 21px;margin:18px 0}
.bookish-reaction-intro{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center}
.bookish-reaction-intro>strong{color:#894c77;font:650 1.2rem/1.3 Georgia,serif}
.bookish-reaction-total{font:800 .9rem system-ui,sans-serif;color:#80516d}
.bookish-live-reactions .bookish-reaction-counts{display:flex;gap:11px;flex-wrap:wrap;padding:10px 0}
.bookish-live-reactions .bookish-reaction-counts>span{
  background:#fff;border:1px solid #f0dce1;border-radius:16px;
  padding:9px 13px;white-space:nowrap;
}
.bookish-live-reactions .bookish-reaction-counts strong{
  display:inline-block;min-width:1ch;color:#8e3b73;font-variant-numeric:tabular-nums;
}
.bookish-live-reactions .bookish-interaction-choices button[aria-pressed="true"]{
  background:#fbe2ef;border-color:#a75a88;box-shadow:0 0 0 2px #f8d3e7;
}
.bookish-live-reactions .bookish-interaction-choices button:disabled{opacity:.65;cursor:wait}
@keyframes bookish-heart-pop{0%{transform:scale(1)}43%{transform:scale(1.35)}100%{transform:scale(1)}}
.bookish-live-reactions .reaction-count-pop{animation:bookish-heart-pop .45s ease-out}
@media(prefers-reduced-motion:reduce){.bookish-live-reactions .reaction-count-pop{animation:none}}

/* Accessible themed dialog for a second reaction; never an error page. */
.bookish-reaction-dialog{
  position:fixed;inset:0;
  width:min(90vw,440px);max-width:440px;
  margin:auto;padding:32px 30px;
  border:2px solid #f1c9d9;border-radius:28px;
  background:linear-gradient(145deg,#fffbf2,#ffeaf0);
  box-shadow:0 22px 75px #4631444a;
  color:#624763;text-align:center;
}
.bookish-reaction-dialog::backdrop{background:#342b3780;backdrop-filter:blur(3px)}
.bookish-reaction-dialog-icon{display:block;font-size:2.6rem;margin-bottom:12px}
.bookish-reaction-dialog h3{font:650 clamp(1.6rem,4vw,2.1rem)/1.2 Georgia,serif;color:#a34374;margin:0 0 14px}
.bookish-reaction-dialog p{font-size:1rem;line-height:1.7;color:#665567;margin:0 0 24px}
.bookish-reaction-dialog-close{
  border:0;border-radius:99px;min-height:46px;
  padding:11px 28px;background:#a3487d;
  color:#fff;font:800 .96rem/1.35 system-ui,sans-serif;cursor:pointer;
}
.bookish-reaction-dialog-close:hover{background:#85345f}
.bookish-reaction-dialog-close:focus-visible{outline:3px solid #285e86;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.bookish-reaction-dialog{animation:none}}
