#ha-story-lab .sl-connected{margin:22px 0;border:1px solid var(--sl-line,#dfd6c7);border-radius:16px;background:#fffdf7;padding:22px}
#ha-story-lab .sl-connected h3{margin:0 0 7px;font:500 27px Georgia,serif}
#ha-story-lab .sl-connected .sl-connected-lead{font-size:14px;color:var(--sl-muted,#60594f);margin-bottom:16px}
#ha-story-lab .sl-cc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#ha-story-lab .sl-cc-field{min-width:0}
#ha-story-lab .sl-cc-field label{display:block;font-weight:700;font-size:13px;margin:0 0 5px}
#ha-story-lab .sl-connected textarea{min-height:100px;resize:vertical}
#ha-story-lab .sl-cc-actions{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin:12px 0}
#ha-story-lab .sl-cc-card{border:1px solid #ddd4c6;padding:15px;border-radius:12px;background:#fffaf0;margin:16px 0}
#ha-story-lab .sl-cc-card h4{margin:0 0 8px;font:bold 17px Georgia,serif}
#ha-story-lab .sl-cc-status{padding:11px 13px;background:#edf8f5;border-left:4px solid #008b81;border-radius:5px;font-size:14px;margin:12px 0}
#ha-story-lab .sl-cc-status[data-error="true"]{background:#fff0f5;border-color:#b60068}
#ha-story-lab .sl-cc-muted{font-size:13px;color:var(--sl-muted,#60594f)}
#ha-story-lab .sl-cc-code{font:700 15px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1px;overflow-wrap:anywhere}
#ha-story-lab .sl-cc-item{background:#fffdf8;border:1px solid #dfd6c7;border-radius:8px;padding:10px;margin-top:8px;white-space:pre-wrap;overflow-wrap:anywhere}
#ha-story-lab .sl-cc-list{max-height:360px;overflow-y:auto;margin-top:10px}
#ha-story-lab .sl-cc-roster{font-size:13px;line-height:1.7;white-space:pre-line}
#ha-story-lab .sl-cc-list button{margin-top:8px}
#ha-story-lab .sl-cc-feedback{white-space:pre-wrap;line-height:1.7}
#ha-story-lab .sl-connected [hidden]{display:none!important}
#ha-story-lab .sl-connected .sl-cc-half{max-width:520px}
#ha-story-lab .sl-connected button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:680px){#ha-story-lab .sl-connected{padding:15px}#ha-story-lab .sl-cc-grid{grid-template-columns:1fr}#ha-story-lab .sl-connected .sl-primary{width:auto}}

/* Stage 8D.1: submission feedback next to the button */
#sl-cc-submit-message{font-weight:700;padding:.65rem .8rem;border-radius:.55rem;background:rgba(0,155,114,.09);color:inherit;margin:.65rem 0;}
#sl-cc-submit-message[data-error="true"]{background:rgba(185,42,42,.12);}
