.stage2-screenplay-reference{margin:10px 0;border:1px solid var(--line,#343434);border-radius:8px;min-width:0;color:var(--txt-0,#e5e5e5);font-size:12px}
.stage2-screenplay-reference>summary{padding:11px 13px;cursor:pointer;line-height:1.5}
.stage2-screenplay-heading{font-weight:600;margin-right:10px}
.stage2-screenplay-status{font-size:11px;color:var(--txt-1,#aaa);white-space:nowrap}
.stage2-screenplay-reference.missing .stage2-screenplay-status{color:#e7b566}
.stage2-screenplay-body,.stage2-screenplay-reference>p{padding:0 13px 13px;margin:0}
.stage2-screenplay-body>p{line-height:1.6;margin:0 0 10px;color:var(--txt-1,#aaa)}
.stage2-screenplay-reference pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;max-height:300px;overflow:auto;padding:12px;border-radius:5px;background:rgba(0,0,0,.17);margin:10px 0}
.stage2-screenplay-target summary{cursor:pointer;font-weight:500}
.stage2-screenplay-body small{display:block;line-height:1.5;color:var(--txt-1,#aaa)}
.stage2-screenplay-reference summary:focus-visible,.stage2-screenplay-reference pre:focus-visible{outline:2px solid #87b6ee;outline-offset:2px}
.stage2-screenplay-pages{margin:0 0 14px;padding:11px;border:1px solid rgba(255,255,255,.1);border-radius:7px;background:rgba(0,0,0,.1)}
.stage2-screenplay-pages-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px;line-height:1.45}
.stage2-screenplay-pages-head strong{font-size:12px;color:var(--txt-0,#e5e5e5)}
.stage2-screenplay-pages-head span,.stage2-screenplay-image-error{color:var(--txt-1,#aaa);font-size:11px}
.stage2-screenplay-page-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:10px}
.stage2-screenplay-page-card{min-width:0;margin:0}
.stage2-screenplay-page-button{position:relative;display:block;width:100%;padding:0;border:1px solid rgba(255,255,255,.18);border-radius:5px;overflow:hidden;background:#d8d0c0;cursor:pointer;line-height:0}
.stage2-screenplay-page-button:hover{border-color:#87b6ee}
.stage2-screenplay-page-button:focus-visible{outline:2px solid #87b6ee;outline-offset:2px}
.stage2-screenplay-page-button img{display:block;width:100%;height:auto;aspect-ratio:1000/1294;object-fit:cover}
.stage2-screenplay-page-open{position:absolute;right:4px;bottom:4px;padding:3px 5px;border-radius:3px;background:rgba(0,0,0,.72);color:#fff;font:10px/1.2 system-ui,sans-serif;opacity:0}
.stage2-screenplay-page-button:hover .stage2-screenplay-page-open,.stage2-screenplay-page-button:focus-visible .stage2-screenplay-page-open{opacity:1}
.stage2-screenplay-page-card figcaption{margin-top:5px;color:var(--txt-1,#aaa);font-size:10px;line-height:1.4}
.stage2-screenplay-image-error{margin:0;line-height:1.5}
.stage2-screenplay-reading{margin-top:12px;border-top:1px solid rgba(255,255,255,.1);padding-top:9px}
.stage2-screenplay-reading>summary{cursor:pointer;color:var(--txt-1,#aaa);font-size:11px}
.stage2-gen-reference-row>.stage2-screenplay-reference{margin:0;grid-column:1/-1;min-width:0;background:var(--bg-2,#faf9f5)}
.stage2-gen-asset[data-reference-kind="screenplay"]{background:#e9e3d7;cursor:zoom-in}
.stage2-gen-asset[data-reference-kind="screenplay"] img{object-fit:contain}
.stage2-gen-asset[data-reference-kind="screenplay"]:focus-visible{outline:2px solid var(--brand,#d67e00);outline-offset:2px}
@media(max-width:600px){.stage2-screenplay-reference pre{max-height:230px}.stage2-screenplay-status{display:inline-block}}
@media(max-width:600px){.stage2-screenplay-pages-head{display:block}.stage2-screenplay-pages-head span{display:block;margin-top:3px}.stage2-screenplay-page-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}