/* V12.1: approved compact five-card showcase. No oversized replacement cards. */
html[data-theme="classic"] .rp-reference-card-row{
  box-sizing:border-box; padding:10px clamp(10px,1.2vw,20px) 12px;overflow:visible;background:#fff;
}
html[data-theme="classic"] .rp-five-cards{
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;
 width:100%;max-width:1800px;margin:0 auto;padding:0;align-items:stretch;overflow:visible;
}
html[data-theme="classic"] .rp-picture-card{
 display:block;position:relative;min-width:0;width:100%;height:clamp(137px,10.75vw,174px);
 min-height:0;max-height:none;overflow:hidden;aspect-ratio:auto;
 border-radius:12px;box-shadow:0 4px 12px rgba(15,34,54,.13);
}
html[data-theme="classic"] .rp-picture-card .rp-classic-media{position:absolute;inset:0;display:block;overflow:hidden}
html[data-theme="classic"] .rp-picture-card .rp-classic-media img{width:100%;height:100%;object-fit:cover;object-position:center right}
html[data-theme="classic"] .rp-picture-card .rp-classic-info{
 position:relative;width:min(86%,260px);height:100%;box-sizing:border-box;
 padding:12px 8px 11px 13px;gap:5px;justify-content:flex-start;overflow:visible;
}
html[data-theme="classic"] .rp-classic-info strong{
 font-size:clamp(14px,1.16vw,21px);line-height:1.12;letter-spacing:-.035em;
 max-width:100%;overflow-wrap:normal;word-break:normal;hyphens:none;
}
html[data-theme="classic"] .rp-classic-description{
 font-size:clamp(10px,.72vw,12px);line-height:1.3;-webkit-line-clamp:3;
 max-width:100%;overflow:hidden;
}
html[data-theme="classic"] .rp-classic-link{
 width:26px;height:26px;min-height:26px;font-size:17px;margin-top:auto;
}
/* Compact: retain five cards across desktop widths, without truncating outer tiles. */
@media (min-width:960px) and (max-width:1299px){
 html[data-theme="classic"] .rp-five-cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
 html[data-theme="classic"] .rp-picture-card{height:147px}
 html[data-theme="classic"] .rp-picture-card .rp-classic-info{padding:11px 7px 9px 11px;gap:4px;width:88%}
 html[data-theme="classic"] .rp-classic-info strong{font-size:clamp(13px,1.28vw,17px)}
 html[data-theme="classic"] .rp-classic-description{font-size:10px;line-height:1.23;-webkit-line-clamp:3}
 html[data-theme="classic"] .rp-classic-link{width:24px;height:24px;min-height:24px;font-size:16px}
}
/* Tablet: 3 + 2 compact tiles; do not stretch card height. */
@media (min-width:640px) and (max-width:959px){
 html[data-theme="classic"] .rp-five-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 html[data-theme="classic"] .rp-picture-card{height:150px}
 html[data-theme="classic"] .rp-classic-info strong{font-size:17px}
 html[data-theme="classic"] .rp-classic-description{font-size:11px}
}
/* Mobile: entire cards, stacked, normal document scroll (no accidental half-cards). */
@media(max-width:639px){
 html[data-theme="classic"] .rp-reference-card-row{padding:10px 12px 15px;overflow:visible}
 html[data-theme="classic"] .rp-five-cards{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;overflow:visible;scroll-snap-type:none;padding:0}
 html[data-theme="classic"] .rp-picture-card{height:142px;min-width:0;width:100%;scroll-snap-align:none}
 html[data-theme="classic"] .rp-picture-card .rp-classic-info{width:70%;padding:14px 11px 10px 16px;gap:5px}
 html[data-theme="classic"] .rp-classic-info strong{font-size:20px}
 html[data-theme="classic"] .rp-classic-description{font-size:12px;line-height:1.34;-webkit-line-clamp:2}
 html[data-theme="classic"] .rp-classic-link{width:27px;height:27px;min-height:27px}
}
