#style-previews { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,max(9rem,calc((100% - 6px)/2))),1fr)); gap:6px; margin:8px 0 14px; }
#style-previews .subtitle-card { display:grid; gap:5px; padding:5px; min-width:0; border:1px solid #c9d3e1; border-radius:8px; background:#fff; color:#24364d; font-size:12px; }
#style-previews .subtitle-card[aria-pressed=true] { outline:2px solid #2563eb; outline-offset:-2px; }
.subtitle-example { display:grid; grid-template-columns:minmax(0,1fr); place-items:center; min-width:0; min-height:46px; padding-inline:4px; background:#29394c; border-radius:4px; }
.subtitle-line { max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:center; font-weight:700; font-size:13px; }
@media (prefers-reduced-motion:no-preference) {
 .subtitle-card:is(:hover,:focus-visible) .pop { animation:subtitle-pop 150ms ease-out; }
 .subtitle-card:is(:hover,:focus-visible) .slide { animation:subtitle-slide 150ms ease-out; }
 .subtitle-card:is(:hover,:focus-visible) .fade { animation:subtitle-fade 150ms ease-out; }
}
@keyframes subtitle-pop { from {transform:scale(.92)} }
@keyframes subtitle-slide { from {transform:translateX(-8px)} }
@keyframes subtitle-fade { from {opacity:0} }

.subtitle-example{position:relative;display:block;aspect-ratio:9/16;background-size:cover;container-type:inline-size;overflow:hidden}.sample-title,#screen-title{position:absolute;left:10%;width:80%;font-weight:800;text-shadow:0 1px 2px #000}.subtitle-example .subtitle-line{position:absolute;bottom:14%;left:8%;width:84%;font-size:8cqw}.sample-title{line-height:1.15}#screen-title{pointer-events:none;z-index:9;white-space:pre-line;line-height:1.15}#screen-title[hidden]{display:none}
