/* Chapter 2 uncropped visual grid + safe review mode */
.chapter-episode-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding:14px;
  background:#f5f9fb;
  align-content:center;
}
.chapter-episode-grid[hidden]{display:none!important}
.chapter-episode-card{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}
.chapter-episode-card img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  object-position:center;
}
.chapter-episode-card>div{
  display:flex;
  align-items:center;
  gap:7px;
  padding:9px 10px 10px;
  color:var(--ink);
}
.chapter-episode-card b{
  font-size:14px;
}

.review-mode button,
.review-mode .option{
  pointer-events:none!important;
}

html[data-theme="dark"] .chapter-episode-grid{
  background:#101b23;
}
html[data-theme="dark"] .chapter-episode-card{
  background:#182731;
  border-color:#314a59;
}
html[data-theme="dark"] .chapter-episode-card>div{
  color:#e8f0f6;
}

@media(min-width:700px){
  .chapter-panel{
    grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)!important;
  }
  .chapter-episode-grid{
    min-height:460px;
    height:100%;
  }
}

@media(max-width:699px){
  .chapter-episode-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    padding:10px;
  }
}


/* v10 chapter image cleanup */
.chapter-panel{
  align-items:stretch;
}

.chapter-art{
  display:block;
  width:100%;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  padding:0!important;
  background:transparent!important;
}

@media(min-width:700px){
  .chapter-panel{
    grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr)!important;
  }

  .chapter-art{
    align-self:center;
    justify-self:stretch;
  }
}

@media(max-width:699px){
  .chapter-art{
    width:100%;
  }
}
