.sb{margin:24px 0 40px}
.sb-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);gap:28px;align-items:start}
.sb-editor{min-width:0}
.sb-preview{position:sticky;top:120px;min-width:0}
.sb-preview-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);margin-bottom:8px}
.sb-preview-head span:first-child{font-weight:700}
.sb canvas{display:block;width:100%;max-width:560px;height:auto;margin:0 auto;border:1px solid var(--line-2);border-radius:8px;box-shadow:0 8px 30px #3028380f}
.sb fieldset{min-width:0;margin:0 0 20px;padding:16px 18px;border:1px solid var(--line-2);border-radius:12px}
.sb legend{padding:0 8px;font-size:17px;font-weight:700}
.sb label{display:block;font-size:13px;font-weight:700;margin:0 0 5px}
.sb input[type=text],.sb textarea{width:100%;min-width:0;box-sizing:border-box;padding:9px 10px;border:1px solid #b9b3bf;border-radius:7px;background:#fff;color:#302838;font:inherit;font-size:16px;line-height:1.6}
.sb textarea{resize:vertical}
.sb-note{font-size:12px;color:var(--muted);line-height:1.8;margin:8px 0 0}
.sb button,.sb .sb-btn{min-height:44px;padding:9px 14px;border:1px solid #c5b6d0;border-radius:8px;background:#fff;color:#493555;font:inherit;font-size:14px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box}
.sb button:hover,.sb .sb-btn:hover{background:var(--brand-soft)}
.sb button:disabled{opacity:.45;cursor:default}
.sb button[aria-pressed=true]{outline:2px solid var(--brand);outline-offset:1px;background:var(--brand-soft)}
.sb .sb-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.sb .sb-primary:hover{background:var(--brand-dark)}
.sb .sb-xbtn{background:#0f1419;border-color:#0f1419;color:#fff}
.sb .sb-xbtn:hover{background:#333}
.sb-group{margin-top:16px}
.sb-group:first-of-type{margin-top:4px}
.sb-lbl{font-size:13px;font-weight:700;margin:0 0 6px}
.sb-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.sb-types{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sb button.sb-type{flex-direction:column;align-items:flex-start;text-align:left;gap:3px;padding:10px 12px;min-height:64px}
.sb-type-name{font-size:15px}
.sb-type-desc{font-size:12px;font-weight:400;color:var(--muted);line-height:1.5}
.sb-qs-head{font-size:13px;color:var(--muted);margin:0 0 4px}
.sb-q{margin-top:18px;padding-top:14px;border-top:1px dashed var(--line-2)}
.sb-q:first-child{border-top:0;padding-top:0;margin-top:6px}
.sb-q label{font-size:14px;line-height:1.6}
.sb-q-no{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:8px;border-radius:50%;background:var(--brand);color:#fff;font-size:12px;vertical-align:1px}
.sb-q-label{display:block;font-size:11.5px;font-weight:400;color:var(--muted);margin:2px 0 0 30px}
.sb-q-foot{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:6px 10px;margin-top:6px}
.sb-chips{display:flex;flex-wrap:wrap;gap:6px;flex:1 1 200px}
.sb button.sb-chip{min-height:30px;padding:3px 10px;font-size:12.5px;font-weight:600;border-radius:15px;border-color:var(--brand-line);background:#fff}
.sb button.sb-chip:hover{background:var(--brand-soft)}
.sb-q-n{font-size:12px;color:var(--muted);white-space:nowrap;margin-left:auto}
.sb-textbox{position:relative}
.sb-textbox textarea{min-height:120px}
.sb-text-foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 10px;margin-top:6px;font-size:12px;color:var(--muted)}
.sb button.sb-small{min-height:32px;padding:4px 10px;font-size:12.5px}
.sb-imgs{list-style:none;margin:6px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.sb-img{border:1px solid var(--line-2);border-radius:8px;background:#fff;padding:5px}
.sb .sb-img-pick{position:relative;display:block;aspect-ratio:3/4;max-width:100%;margin:0;border-radius:6px;overflow:hidden;background:#f3eff6;cursor:pointer}
.sb-img-pick input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer;z-index:1}
.sb-img-pick img{display:block;width:100%;height:100%;object-fit:cover}
.sb-img-empty{display:flex;align-items:center;justify-content:center;height:100%;font-size:28px;font-weight:400;color:#9a88a8}
.sb button.sb-tool{width:100%;min-height:32px;margin-top:5px;padding:0;font-size:12.5px}
.sb-themes{display:flex;flex-wrap:wrap;gap:6px}
.sb-themes button{flex:1 1 auto;min-width:64px;padding:6px 10px}
.sb-sw{display:inline-block;width:18px;height:18px;border-radius:50%;border:3px solid;box-sizing:border-box;flex:none}
.sb .sb-check{display:flex;align-items:flex-start;gap:8px;font-size:13.5px;font-weight:400;line-height:1.5;margin:6px 0 0;cursor:pointer}
.sb-check input{width:18px;height:18px;margin:2px 0 0;accent-color:var(--brand);flex:none}
.sb-rows{margin-top:4px}
.sb-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.sb-actions > *{flex:1 1 140px}
.sb-hint{font-size:13px;line-height:1.8;margin:14px 0 0;padding:10px 12px;background:var(--brand-soft);border-radius:8px}
.sb-msg{font-size:13px;min-height:1.8em;margin:8px 0 0}
.sb-fallback img{display:block;width:100%;max-width:560px;margin:8px auto 0;border:1px solid var(--line-2);border-radius:8px}
.sb-sub{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.sb-jump{display:none;width:100%;margin:0 0 14px}
.sb-article{max-width:760px;margin:40px auto 0;line-height:1.9}
.sb-article h2{font-size:21px;margin:34px 0 12px}
.sb-article h3{font-size:17px;margin:24px 0 8px}
.sb-article table{border-collapse:collapse;width:100%;font-size:14px}
.sb-article th,.sb-article td{border:1px solid var(--line-2);padding:8px 10px;text-align:left;vertical-align:top}
.sb-article th{background:var(--bg);white-space:nowrap}
.sb-article details{border-bottom:1px solid var(--line-2);padding:14px 0}
.sb-article summary{font-weight:700;cursor:pointer}
.sb-article a{color:var(--brand);text-decoration:underline;text-underline-offset:3px}
@media (max-width:820px){
.sb-layout{grid-template-columns:minmax(0,1fr);gap:20px}
.sb-preview{position:static}
.sb fieldset{padding:14px 12px}
.sb-two{grid-template-columns:1fr}
.sb-types{grid-template-columns:1fr}
.sb-jump{display:inline-flex}
}
