.storyboard-type-card{gap:16px;padding:20px;align-self:start;min-width:0}
.storyboard-type-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.storyboard-type-heading h3{font-size:20px;line-height:1.5;font-weight:650}
.storyboard-type-category{flex:none;padding:2px 9px;border:1px solid #454545;border-radius:6px;color:#d4d4d4;font-size:12px;line-height:22px;background:#292929}
.storyboard-type-card>p.storyboard-type-description{display:block;overflow:visible;color:#bdbdbd;font-size:14px;line-height:1.8}
.storyboard-type-mappings{display:grid;gap:0;list-style:none;margin:0;padding:0;border:1px solid #383838;border-radius:10px;overflow:hidden}
.storyboard-type-mapping{display:flex;flex-direction:column;gap:10px;min-width:0;padding:16px;background:#252525}
.storyboard-type-mapping+.storyboard-type-mapping{border-top:1px solid #383838}
.storyboard-type-mapping h4{margin:0;font-size:15px;line-height:1.5;font-weight:600;color:#ededed}
.storyboard-type-lora{display:block;align-self:stretch;min-width:0;overflow-wrap:anywhere;font-family:ui-monospace,Consolas,monospace;font-size:13px;line-height:1.7;color:#d5d5d5;background:none;padding:0}
.storyboard-type-mapping dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));gap:8px 16px;margin:0;min-width:0;padding-top:2px;font-size:13px;line-height:1.7}
.storyboard-type-mapping dl div{display:flex;flex-wrap:wrap;gap:2px 8px;align-items:baseline;min-width:0}
.storyboard-type-mapping dt{font-weight:400;color:#a9a9a9}
.storyboard-type-mapping dd{margin:0;min-width:0;font-family:ui-monospace,Consolas,monospace;color:#f0f0f0;overflow-wrap:anywhere}
.storyboard-type-details{margin-top:0;border-top:1px solid #383838;padding-top:8px}
.storyboard-type-details>summary{display:list-item;cursor:pointer;min-height:44px;line-height:44px;font-size:14px;font-weight:500;color:#d6d6d6}
.storyboard-type-details>summary:focus-visible{outline:2px solid #77d9bd;outline-offset:3px;border-radius:4px}
.storyboard-type-details .previs-markdown-preview{font-size:14px;line-height:1.85;overflow-wrap:anywhere}
.storyboard-type-details .previs-markdown-preview h1{font-size:18px;line-height:1.5;margin:16px 0}
.storyboard-type-details .previs-markdown-preview h2{font-size:16px;line-height:1.6;margin:24px 0 12px}
.storyboard-type-details .previs-markdown-preview table{display:block;width:100%;border:0;border-collapse:separate;margin:12px 0 20px}
.storyboard-type-details .previs-markdown-preview thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.storyboard-type-details .previs-markdown-preview tbody{display:grid;gap:12px}
.storyboard-type-details .previs-markdown-preview tr{display:block;min-width:0;padding:16px;border:1px solid #383838;border-radius:8px;background:#252525}
.storyboard-type-details .previs-markdown-preview td{display:block;width:auto;min-width:0;border:0;padding:0;text-align:left;overflow-wrap:anywhere;word-break:normal;line-height:1.85}
.storyboard-type-details .previs-markdown-preview td+td{margin-top:8px}
.storyboard-type-details .previs-markdown-preview td:first-child{font-size:15px;font-weight:650;color:#ededed}
.storyboard-type-details .previs-markdown-preview td:not(:first-child)::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:12px;color:#aaa}
.storyboard-type-details .previs-markdown-preview ul{padding-left:20px;margin:12px 0 20px}
.storyboard-type-details .previs-markdown-preview li{padding-left:3px;margin:0 0 16px;line-height:1.9}
@media(max-width:600px){.storyboard-type-card{padding:16px;gap:14px}.storyboard-type-heading h3{font-size:18px}.storyboard-type-mapping{padding:12px}.storyboard-type-mapping dl{grid-template-columns:repeat(auto-fit,minmax(min(100%,112px),1fr))}:is(#storyboard-types,#director-plans) .style-preset-search{flex:1 0 100%;max-width:none;order:2}:is(#storyboard-type-refresh,#director-plan-refresh){margin-left:auto}}

.storyboard-mapping-heading{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;justify-content:space-between}
.storyboard-mapping-badge{font-size:12px;line-height:1.6;color:#c8c8c8;background:#303030;border:1px solid #454545;border-radius:5px;padding:2px 7px;white-space:nowrap}
.storyboard-type-mapping p.storyboard-mapping-hint{display:block;margin:2px 0 0;font-size:13px;line-height:1.7;color:#bdbdbd}

/* Each mapping has two compact rows; narrow screens can scroll full values. */
.storyboard-type-mapping{gap:6px;padding:12px 14px}
.storyboard-mapping-heading{flex-wrap:nowrap;justify-content:flex-start;gap:10px;min-width:0;overflow-x:auto}
.storyboard-mapping-heading h4{flex:none;font-size:14px;white-space:nowrap}
.storyboard-mapping-heading .storyboard-type-lora{flex:none;align-self:center;font-size:12px;white-space:nowrap;overflow-wrap:normal}
.storyboard-mapping-badge{margin-left:auto;flex:none;font-size:12px;padding:0 5px}
.storyboard-type-mapping dl{display:flex;flex-wrap:nowrap;align-items:center;gap:12px;padding:0;font-size:12px;line-height:22px;overflow-x:auto;scrollbar-width:thin}
.storyboard-type-mapping dl div{flex:none;flex-wrap:nowrap;gap:5px;white-space:nowrap}
.storyboard-type-mapping .storyboard-mapping-hint{flex:none;white-space:nowrap;color:#bdbdbd;font-size:12px;line-height:22px}
.storyboard-type-mapping dl:focus-visible{outline:1px solid #77d9bd;outline-offset:2px}
.storyboard-type-choices>h4{margin:8px 0;font-size:12px;line-height:1.8;color:#ededed}
.storyboard-shot-list{margin:0;padding-left:18px;list-style:disc;color:#d4d4d4;font-size:12px;line-height:1.8}
.storyboard-shot-list>li{display:list-item;margin:0 0 6px;padding:0;overflow-wrap:anywhere}
.storyboard-shot-title{font-size:inherit;font-weight:500;color:#ededed}
.storyboard-type-card>.storyboard-type-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:0;padding-top:0}
#storyboard-type-list .storyboard-type-actions button{width:auto;min-height:30px;height:30px;margin:0;padding:4px 10px;font-size:13px;line-height:20px;border-radius:8px}
.storyboard-type-editor .modal-dialog{max-width:1000px}
.storyboard-type-editor form{display:grid;gap:16px;min-width:0}
.storyboard-editor-field{display:grid;gap:8px;font-size:14px;min-width:0}
.storyboard-editor-field :is(input,textarea,select){width:100%;min-width:0;box-sizing:border-box}
.storyboard-editor-field textarea{resize:vertical}
.storyboard-type-editor .previs-text-editor{min-width:0}
