.storyboard-repair [hidden],.storyboard-repair[hidden]{display:none!important}
.storyboard-repair{position:fixed;inset:0;z-index:10050;background:#18243880;padding:2vh 2vw;display:flex;justify-content:center;align-items:center}
.storyboard-repair__panel{background:#fff;color:#162338;font-family:var(--font-sans);font-size:var(--ui-font-body);font-weight:var(--ui-font-weight);font-style:var(--ui-font-style);border-radius:16px;width:min(1560px,96vw);height:96vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 16px 60px #0004}
.storyboard-repair header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 22px;border-bottom:1px solid #dde4ec;flex-shrink:0}
.storyboard-repair header h3{margin:0 0 4px;font-size:var(--ui-font-page);font-weight:var(--ui-font-weight)}.storyboard-repair [data-repair-subtitle]{font-size:var(--ui-font-meta);color:#64748b}
.storyboard-repair__toolbar,.storyboard-repair__selectors{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.storyboard-repair__columns{display:grid;grid-template-columns:minmax(260px,34%) minmax(0,1fr);min-height:0;flex:1}
.storyboard-repair aside{overflow:auto;padding:16px 22px;background:#f7f9fc;border-right:1px solid #dde4ec;line-height:1.7;overflow-wrap:anywhere}
.storyboard-repair aside h4{margin:10px 0;font-size:var(--ui-font-section);font-weight:var(--ui-font-weight)}.storyboard-repair__editor{min-height:0;min-width:0;display:flex;flex-direction:column}
.storyboard-repair__selectors{padding:12px 22px;border-bottom:1px solid #e6eaf0;flex-shrink:0}
.storyboard-repair select{max-width:290px;padding:7px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;font:inherit}
.storyboard-repair__status,.storyboard-repair__recovery{padding:8px 22px;margin:0;background:#eef5fb;white-space:pre-wrap;font-size:var(--ui-font-meta);flex-shrink:0}
.storyboard-repair__chat{overflow:auto;min-height:0;flex:1;padding:16px 24px;scroll-behavior:smooth}
.storyboard-repair__chat article{padding:14px 16px;margin:8px 0 20px;border:1px solid transparent;border-radius:12px}
.storyboard-repair__chat article.is-selected{border-color:#d1dce9;background:#fafcff}
.storyboard-repair__message-label{font-size:var(--ui-font-card);font-weight:var(--ui-font-weight);color:#64748b;margin-bottom:12px}
.storyboard-repair__body,.storyboard-repair pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.8;margin:0}
.storyboard-repair__user{margin:24px 0 10px 12%;padding:12px 16px;background:#edf1f5;border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.storyboard-repair__actions{display:flex;gap:8px;justify-content:flex-end;margin-top:10px}
.storyboard-repair button{font:inherit;padding:6px 12px;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;cursor:pointer}
.storyboard-repair button:hover{background:#e9eef4}.storyboard-repair button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.storyboard-repair button:disabled{opacity:.45;cursor:not-allowed}.storyboard-repair button[data-repair-action="adopt"],.storyboard-repair button[data-repair-action="save"]{border-color:#cbd5e1;background:#fff}
.storyboard-repair__composer{padding:12px 22px 10px;border-top:1px solid #e6eaf0;flex-shrink:0;background:#fff}
.storyboard-repair__input{display:flex;align-items:flex-end;gap:8px;border:1px solid #cbd5e1;border-radius:16px;padding:10px;background:#fafbfc}
.storyboard-repair textarea{box-sizing:border-box;width:100%;min-height:140px;font:inherit;line-height:1.7;padding:12px;border:1px solid #becbd9;border-radius:8px;resize:vertical}
.storyboard-repair [data-repair-feedback]{flex:1;min-width:0;min-height:52px;max-height:160px;padding:3px 4px;border:0;background:transparent;resize:none}
.storyboard-repair [data-repair-feedback]:focus{outline:none}.storyboard-repair__input:focus-within{border-color:#64748b}
.storyboard-repair [data-repair-send]{width:36px;height:36px;flex-shrink:0;padding:0;border-radius:50%;font-size:0;background:var(--mj-button)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;line-height:36px}
.storyboard-repair__hint{display:flex;gap:10px;justify-content:space-between;align-items:flex-start;color:#64748b;font-size:var(--ui-font-caption);margin-top:7px;flex-wrap:wrap}
.storyboard-repair details{margin:10px 0}.storyboard-repair summary{cursor:pointer}.storyboard-repair__hint details{margin:0;text-align:right}
.storyboard-repair__hint details div{max-width:300px}.storyboard-repair details pre{font-size:13px}
.storyboard-repair__muted,.storyboard-repair small{color:#64748b}.storyboard-repair__error{color:#a52216}
.storyboard-repair__refs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.storyboard-repair figure{margin:0}.storyboard-repair img{width:100%;max-height:170px;object-fit:contain}.storyboard-repair figcaption{font-size:var(--ui-font-caption)}
.storyboard-repair fieldset{border:1px solid #d7dfe9;border-radius:8px;margin:12px 0}
.storyboard-repair__measure{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0;padding-bottom:10px;border-bottom:1px solid #e6eaf0}
.storyboard-repair__measure label{display:flex;flex-direction:column;gap:4px;font-size:var(--ui-font-label);max-width:145px}
.storyboard-repair__measure input{box-sizing:border-box;width:130px;padding:6px;border:1px solid #cbd5e1;border-radius:6px;font:inherit}
.storyboard-repair--no-evidence .storyboard-repair__columns{grid-template-columns:minmax(0,1fr)}.storyboard-repair--no-evidence aside{display:none}
.storyboard-repair:fullscreen,.storyboard-repair--fullscreen{padding:0;width:100vw;height:100vh}
.storyboard-repair:fullscreen .storyboard-repair__panel,.storyboard-repair--fullscreen .storyboard-repair__panel{width:100%;height:100%;border-radius:0}
@media(max-width:800px){.storyboard-repair__columns{grid-template-columns:minmax(0,1fr)}.storyboard-repair aside{max-height:25vh;border-bottom:1px solid #dde4ec}.storyboard-repair:not(.storyboard-repair--no-evidence) .storyboard-repair__columns{grid-template-rows:auto minmax(0,1fr)}.storyboard-repair__panel{height:98vh}.storyboard-repair{padding:1vh 1vw}.storyboard-repair header{padding:10px 12px}.storyboard-repair__chat,.storyboard-repair__selectors,.storyboard-repair__composer{padding-left:12px;padding-right:12px}.storyboard-repair select{max-width:210px}}
