.wb-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.wb-search { display:flex; flex:1; align-items:center; gap:10px; padding:0 12px; min-width:0; border:1px solid var(--line); border-radius:12px; background:#12111c; color:var(--muted); }
.wb-search input { width:100%; min-width:0; border:0; background:transparent; padding:12px 0; font-size:12px; box-shadow:none; }
.wb-search .icon { flex:none; }
.wb-layout { display:grid; grid-template-columns:190px minmax(0,1fr); min-height:350px; max-height:56dvh; border:1px solid var(--line); border-radius:16px; overflow:hidden; }
.wb-tree { padding:12px 8px; overflow:auto; background:#100f19; border-right:1px solid var(--line); }
.wb-work { margin-bottom:8px; }
.wb-work button { display:flex; align-items:center; gap:8px; width:100%; padding:10px 9px; text-align:left; font-size:12px; color:#bfb7d1; border:1px solid transparent; border-radius:12px; background:transparent; }
.wb-work button span { flex:1; min-width:0; overflow-wrap:anywhere; }
.wb-work button .icon { width:15px; height:15px; flex:none; }
.wb-work button small { font-size:10px; }
.wb-work button:hover { background:#ffffff06; }
.wb-work-title.selected { color:#e9d5ff; background:#a855f719; border-color:#a855f72b; }
.wb-scenes { margin-left:16px; border-left:1px solid #a855f733; padding-left:6px; margin-top:5px; }
.wb-scenes button { font-size:11px; padding:9px 6px; }
.wb-scenes button.selected { background:#6366f11f; color:#ddd6fe; }
.wb-tree-footer { padding:10px 0 2px; }
.wb-tree-footer .btn { width:100%; }
.wb-content { min-width:0; overflow:auto; padding:20px; background:#18172475; }
.wb-scene-head { padding-bottom:20px; border-bottom:1px solid var(--line); margin-bottom:18px; }
.wb-scene-head .eyebrow { font-size:10px; letter-spacing:1px; }
.wb-scene-head h3 { margin:8px 0 10px; font-size:20px; }
.wb-scene-head p { color:#aba3ba; font-size:12px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; margin:0 0 15px; }
.wb-results-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; font-size:12px; }
.wb-entry { padding:16px; border:1px solid var(--line); background:#0c0c125c; border-radius:12px; margin:0 0 12px; }
.wb-entry h4 { margin:0; font-size:14px; overflow-wrap:anywhere; }
.wb-entry.is-disabled { opacity:.6; }
.wb-entry .tag { font-size:10px; }
.wb-entry p { color:#aaa3b9; font-size:12px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; margin:12px 0; max-height:160px; overflow:auto; }
.wb-keywords { display:flex; flex-wrap:wrap; gap:5px; margin-top:10px; }
.wb-keywords span { color:#c7bcfa; background:#6366f11a; border-radius:7px; padding:3px 6px; font-size:10px; }
.wb-keywords small, .wb-scene-label { color:var(--muted); font-size:10px; }
.wb-entry-actions { display:flex; gap:8px; flex-wrap:wrap; }
.wb-empty { text-align:center; padding:38px 12px; color:var(--muted); }
.wb-empty>.icon { width:35px; height:35px; color:#a78bfa; margin-bottom:14px; }
.wb-empty h3 { font-size:15px; color:#d7cce7; margin-bottom:10px; }
.wb-empty p { font-size:12px; line-height:1.7; }
.story-hint { color:var(--muted); font-size:11px; line-height:1.8; margin:14px 0 0; }
.story-editor>.stack { gap:18px; }
.story-editor textarea { max-height:260px; }
.story-book-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-height:36dvh; overflow:auto; }
.story-book-option { display:flex; align-items:center; gap:10px; border:1px solid var(--line); background:#12111c; padding:12px; border-radius:12px; cursor:pointer; min-width:0; }
.story-book-option:has(input:checked) { background:#a855f714; border-color:#a855f759; }
.story-book-option input { width:15px; height:15px; flex:none; accent-color:#a855f7; }
.story-book-option>span:last-child { min-width:0; }
.story-book-option strong { display:block; font-size:12px; overflow-wrap:anywhere; }
.story-book-option small { display:block; font-size:10px; color:var(--muted); margin-top:5px; }
.story-panel { padding:12px 28px; border-bottom:1px solid var(--line); background:#14111de6; flex:none; }
.story-stage { display:flex; align-items:center; gap:14px; justify-content:space-between; margin-bottom:10px; }
.story-stage-select { display:flex; gap:8px; align-items:center; border:0; background:transparent; color:#d8b4fe; font-size:12px; padding:0; min-width:0; text-align:left; }
.story-stage-select>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.story-stage-select>.icon { width:16px; height:16px; flex:none; }
.story-stage-select small { color:#a89ab9; font-size:11px; }
.story-book-count { color:#8e849d; font-size:10px; flex:none; }
.story-slots-strip { display:flex; align-items:center; gap:8px; overflow-x:auto; padding:2px 0 4px; }
.story-slot-chip,.story-slot-add { display:flex; align-items:center; gap:7px; border:1px solid var(--line); border-radius:12px; padding:6px 9px; background:#211d30; color:#ddd3ef; font-size:11px; flex:none; }
.story-slot-chip .avatar { width:24px; height:24px; border-radius:8px; }
.story-slot-chip>span:not(.avatar) { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.story-slot-chip small { font-size:9px; color:#a99bc0; }
.story-slot-chip.primary-slot { border-color:#a855f759; background:#a855f71a; }
.story-slot-chip.primary-slot small { color:#d8b4fe; }
.story-slot-add { border-style:dashed; background:transparent; padding:9px; color:#c4a6e6; }
.story-slot-add>.icon { width:14px; height:14px; }
.story-slot-add small { font-size:9px; color:#94869f; }
.story-slots-heading { font-size:21px; margin-top:8px; }
.story-slot-list { display:grid; gap:10px; margin-top:20px; }
.story-slot-row,.story-candidate { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--line); border-radius:12px; background:#12111c; min-width:0; }
.story-slot-row.primary-slot { border-color:#a855f74d; background:#a855f70f; }
.story-slot-row strong,.story-candidate strong { display:block; font-size:13px; overflow-wrap:anywhere; }
.story-slot-row small,.story-candidate small { display:block; font-size:10px; color:var(--muted); margin-top:5px; line-height:1.6; }
.story-slot-controls { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.story-slot-controls .tag { font-size:10px; }
.story-summon-heading { display:flex; gap:16px; align-items:center; margin:25px 0 14px; }
.story-summon-heading h3 { font-size:15px; flex:none; }
.story-candidates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-height:32dvh; overflow:auto; }
.story-candidate { padding:12px; }
.story-candidate .avatar { width:35px; height:35px; }
.story-candidate .btn { flex:none; }
@media(max-width:600px){
 .wb-toolbar { align-items:stretch; gap:8px; }
 .wb-toolbar>.btn { padding:9px; font-size:11px; flex:none; }
 .wb-search { padding:0 8px; gap:6px; }
 .wb-search input { font-size:11px; }
 .wb-layout { grid-template-columns:minmax(100px,30%) minmax(0,1fr); max-height:59dvh; }
 .wb-tree { padding:8px 4px; }
 .wb-work button { padding:9px 5px; gap:5px; font-size:11px; }
 .wb-work button>.icon { display:none; }
 .wb-scenes { margin-left:5px; padding-left:4px; }
 .wb-content { padding:12px 10px; }
 .wb-scene-head h3 { font-size:17px; }
 .wb-scene-head .row { gap:6px; }
 .wb-scene-head .btn,.wb-entry-actions .btn { padding:7px 9px; font-size:10px; }
 .wb-entry { padding:12px 10px; }
 .wb-entry h4 { font-size:12px; }
 .wb-entry p { font-size:11px; }
 .wb-entry-actions { gap:5px; }
 .story-book-options { grid-template-columns:1fr; }
 .wb-tree-footer .btn { font-size:10px; padding:8px 4px; }
 .wb-tree-footer .icon { display:none; }
 .story-panel { padding:10px 14px 7px; }
 .story-stage { gap:8px; margin-bottom:7px; }
 .story-stage-select { font-size:11px; }
 .story-stage-select small { font-size:10px; }
 .story-book-count { font-size:9px; }
 .story-slot-chip>span:not(.avatar) { max-width:85px; }
 .story-slot-row { padding:11px; gap:9px; flex-wrap:wrap; }
 .story-slot-row>.avatar { width:35px; height:35px; }
 .story-slot-row>.grow { flex-basis:calc(100% - 50px); }
 .story-slot-controls { width:100%; border-top:1px solid var(--line); padding-top:9px; }
 .story-slot-controls .tag { margin-right:auto; }
 .story-candidates { grid-template-columns:1fr; max-height:31dvh; }
 .story-summon-heading { gap:10px; }
 .story-summon-heading h3 { font-size:13px; }
}
