.storyboards-panel { min-height:120px; color:var(--messages-text); }
.storyboards-panel[hidden],.storyboards-panel [hidden] { display:none; }
.storyboards-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 10px; }
.storyboards-heading h2 { margin:0; font-size:20px; }
.storyboards-heading-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.storyboards-panel button { min-height:36px; padding:6px 10px; border:1px solid var(--messages-control-border); border-radius:6px; background:var(--messages-surface-raised); color:var(--messages-text); font:600 13px Inter,Arial,sans-serif; cursor:pointer; }
.storyboards-heading-actions .storyboard-feedback { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:6px 10px; border:1px solid #245A60; border-radius:6px; background:#245A60; color:#fff; font:600 13px Inter,Arial,sans-serif; cursor:pointer; text-decoration:none; }
.storyboards-heading-actions .storyboard-feedback:hover { border-color:#1B474C; background:#1B474C; }
.storyboards-heading-actions .storyboard-feedback:focus-visible { outline:3px solid #fff; outline-offset:2px; box-shadow:0 0 0 3px #245A60; }
.storyboard-feedback-icon { flex:0 0 auto; width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linejoin:round; }
.storyboards-panel button:disabled { opacity:.5; cursor:default; }
.storyboards-panel button:focus-visible,.storyboards-panel input:focus-visible,.storyboards-panel textarea:focus-visible { outline:3px solid var(--messages-accent); outline-offset:2px; }
#storyboardsStatus { min-height:20px; margin:0 0 8px; font-size:13px; }
#storyboardsStatus:empty { display:none; }
#storyboardsStatus.is-error { color:var(--messages-error); }
#storyboardsList,#storyboardScenes { display:grid; gap:8px; }
.storyboards-panel .storyboard-card { width:100%; overflow:hidden; border:1px solid var(--messages-border); border-radius:8px; background:var(--messages-surface-raised); }
.storyboards-panel .storyboard-list-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; text-align:left; }
.storyboard-list-text,.storyboard-scene-text { display:grid; gap:3px; min-width:0; }
.storyboard-list-title { font-size:15px; font-weight:700; overflow-wrap:anywhere; }
.storyboard-list-description,.storyboard-scene-summary { color:var(--messages-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.storyboard-list-meta,.storyboard-header-meta,.storyboard-scene-type { color:#637184; font-size:12px; font-weight:500; }
.storyboard-chevron { flex:0 0 auto; color:#637184; font-size:20px; line-height:1; }
.storyboard-back { margin:0 0 10px; }
.storyboard-header-card { margin-bottom:8px; padding:12px 14px; }
.storyboard-header-card h3 { margin:0 0 5px; font-size:17px; }
.storyboard-header-card p { margin:0 0 8px; overflow-wrap:anywhere; white-space:pre-wrap; }
.storyboard-actions { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:10px; margin-top:10px; }
.storyboards-panel label { display:block; margin:8px 0 4px; font-weight:600; }
.storyboards-panel input,.storyboards-panel textarea { display:block; width:100%; padding:8px; border:1px solid var(--messages-control-border); border-radius:6px; background:var(--messages-surface); color:var(--messages-text); font:inherit; }
.storyboards-panel textarea { resize:vertical; }
.storyboard-scene { min-width:0; }
.storyboards-panel .storyboard-scene-toggle { display:grid; grid-template-columns:64px minmax(0,1fr) auto; align-items:center; gap:10px; width:100%; min-height:82px; padding:8px 12px; border:0; background:transparent; text-align:left; }
.storyboard-scene-title { font-size:14px; font-weight:700; overflow-wrap:anywhere; }
.storyboard-scene-preview { display:grid; place-items:center; width:64px; height:64px; overflow:hidden; border:1px solid var(--messages-border); border-radius:5px; color:#637184; font-size:10px; text-align:center; }
.storyboard-scene-preview img { width:100%; height:100%; object-fit:contain; }
.storyboard-scene-content { padding:10px 12px 12px; border-top:1px solid var(--messages-border); }
.storyboard-scene-content p { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.storyboards-panel .storyboard-order-button { min-width:36px; padding:4px; font-size:18px; line-height:1; }
.storyboard-card-error { margin:7px 0 0; color:var(--messages-error); font-size:12px; }
#storyboardAdd { margin-top:10px; }
#storyboardPicker { width:min(620px,calc(100% - 24px)); max-height:85vh; max-height:85dvh; box-sizing:border-box; overflow:hidden; padding:18px; border:1px solid var(--messages-border); border-radius:8px; background:var(--messages-surface); color:var(--messages-text); }
#storyboardPicker[open] { display:grid; grid-template-rows:auto auto auto minmax(0,1fr) auto; }
#storyboardPicker::backdrop { background:#0008; }
#storyboardPicker h3 { margin-top:0; }
#storyboardPicker .storyboard-picker-tabs { display:flex; gap:0; margin:12px 0 0; border:1px solid var(--messages-control-border); border-radius:6px; overflow:hidden; }
#storyboardPicker .storyboard-picker-tabs button { flex:1 1 50%; min-width:0; border:0; border-radius:0; background:var(--messages-surface-raised); }
#storyboardPicker .storyboard-picker-tabs button + button { border-left:1px solid var(--messages-control-border); }
#storyboardPicker .storyboard-picker-tabs button[aria-selected="true"] { background:var(--messages-accent); color:#fff; }
#storyboardChoices { display:grid; min-height:0; gap:8px; margin:12px 0; overflow-y:auto; overscroll-behavior:contain; }
#storyboardPickerClose { justify-self:end; }
.storyboard-choice-row { display:flex; align-items:stretch; gap:8px; }
.storyboards-panel .storyboard-choice { display:flex; flex:1 1 auto; min-width:0; width:auto; align-items:center; gap:10px; min-height:64px; text-align:left; overflow-wrap:anywhere; }
.storyboard-choice img { width:58px; height:46px; object-fit:contain; }
.storyboard-preview-button { flex:0 0 auto; }
.storyboard-picker-preview { display:grid; justify-items:center; gap:8px; padding:4px 0; text-align:center; }
.storyboard-picker-preview img { display:block; max-width:100%; max-height:min(46vh,360px); object-fit:contain; border:1px solid var(--messages-border); border-radius:6px; }
.storyboard-picker-preview h4,.storyboard-picker-preview p { margin:0; overflow-wrap:anywhere; }
.storyboard-picker-preview h4 { font-size:16px; }
.storyboard-picker-preview-type { color:#637184; font-size:12px; font-weight:500; }
@media (max-width:420px) { .storyboard-choice-row { align-items:stretch; gap:6px; } .storyboard-preview-button { padding-inline:8px; } }
