/* Compact controls; preview stays available while editing wording. */
#text{min-height:52px;height:72px;max-height:160px;overflow:auto}
.story-writing-view{max-height:180px}
.story-writing-info{font-size:12px}
.story-writing .hint{font-size:11px;margin-bottom:6px}
.story-writing{margin-bottom:10px}
.story-readable{max-height:120px}
.preview-panel .story-proof{margin:0 14px 10px;padding:10px}
.preview-panel .story-proof canvas{height:130px;object-fit:contain}
.preview-panel .story-proof h3{margin-bottom:6px}
.preview-panel .story-proof p{margin:5px 0;font-size:11px}
.preview-panel .story-proof details{font-size:12px}
.preview-panel .story-proof summary{cursor:pointer}
@media(min-width:851px){
 .preview-panel{max-height:calc(100dvh - 36px);overflow:auto}
 #viewer{height:clamp(220px,44dvh,440px)}
 .story-active #viewer{height:clamp(190px,35dvh,350px)}
}
@media(max-width:850px){
 .words-active .studio{display:flex;flex-direction:column}
 .words-active .controls{width:100%}
 .words-active .preview-panel{order:-1;position:sticky;top:0;z-index:4;width:100%;max-height:46dvh;overflow:auto;box-shadow:0 4px 14px #163c3d22}
 .words-active #viewer{height:clamp(100px,17dvh,145px)}
 .words-active .preview-heading{padding:6px 10px;font-size:11px}
 .words-active .preview-toolbar{padding:5px 10px}
 .words-active .preview-note,.words-active .preview-panel>.summary{display:none}
 .words-active .preview-panel .story-proof{margin:0 8px 6px;padding:6px}
 .words-active .preview-panel .story-proof canvas{height:100px}
 .words-active .preview-panel .story-proof h3{font-size:11px;margin-bottom:3px}
 .words-active .preview-panel .story-proof details{display:none}
 .words-active .preview-panel .story-proof p{margin:2px 0;font-size:10px}
 .story-writing-view{max-height:145px}
 #text,.story-writing-line{scroll-margin-top:47dvh}
}
