/* Workbench v1. Navigation + library + reading; no changes to panel ownership. */
.wb-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
:root{--wb-line:rgba(226,227,211,.13);--wb-focus:#edbb87;--wb-muted:#a3aaa1;--wb-ease:cubic-bezier(.2,.8,.2,1)}
.wb-icon-button{border:1px solid transparent;background:transparent;min-width:38px;min-height:38px;width:38px;flex:none;padding:0;border-radius:9px;display:inline-grid;place-items:center;color:var(--muted);cursor:pointer;transition:background .16s,border-color .16s,color .16s}
.wb-icon-button svg{width:17px;height:17px}
.wb-icon-button:hover,.wb-icon-button:focus-visible{background:#ffffff08;border-color:var(--wb-line);color:var(--fg)}
.wb-icon-button:focus-visible,.wb-command-trigger:focus-visible,.wb-star:focus-visible,.wb-copy-message:focus-visible,.wb-filter:focus-visible{outline:2px solid var(--wb-focus);outline-offset:3px}
.wb-command-trigger{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:36px;min-width:160px;padding:0 10px;border:1px solid var(--wb-line);border-radius:9px;background:linear-gradient(140deg,#ffffff05,transparent);color:#b9bdb5;font-size:12px;cursor:pointer;transition:background .16s,border-color .16s}
.wb-command-trigger:hover{border-color:#7d705b;background:#e6b17708;color:var(--fg)}
.wb-command-trigger svg{width:15px;height:15px;flex:none}
.wb-command-trigger kbd{margin-left:auto;font:10px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;border:1px solid #ffffff15;border-radius:4px;padding:0 4px;color:#9fa597;white-space:nowrap}
[data-workbench] .top-actions{gap:7px}
[data-workbench] .topbar{padding-inline:20px}
[data-workbench] .layout-reset.wb-icon-button{min-height:36px;padding:0;width:36px;min-width:36px}
[data-workbench] .side-new{justify-content:flex-start;min-height:42px;font-size:12px}
[data-workbench] .nav-item,[data-workbench] .project-item{font-size:12px}
.wb-favorite-project .project-name::after{content:' · ★';color:#d6b489;font-size:9px}
[data-workbench] .profile-copy strong{font-size:11px}
[data-workbench] .connection-status{background:linear-gradient(150deg,#e8b47705,transparent);border-color:var(--wb-line)}
.wb-library-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:14px;margin:0 0 20px;min-width:0}
.wb-library-filters{display:inline-flex;align-items:center;gap:4px;flex:none;background:#ffffff03;border:1px solid var(--wb-line);padding:3px;border-radius:10px}
.wb-filter{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid transparent;border-radius:7px;background:transparent;min-height:34px;padding:0 12px;font-size:12px;color:#a7ada3;cursor:pointer;transition:background .16s,color .16s,border-color .16s}
.wb-filter svg{width:13px;height:13px}
.wb-filter[aria-pressed=true]{background:#282d26;border-color:#ffffff0b;color:#f1eee5;box-shadow:0 1px 3px #0002}
.wb-filter:hover{color:#f1eee5}
.wb-library-tools{display:flex;align-items:center;gap:8px;min-width:0;flex:1;justify-content:flex-end}
.wb-project-search{position:relative;min-width:130px;max-width:280px;flex:1}
.wb-project-search>svg{width:15px;height:15px;position:absolute;top:12px;left:12px;color:#8d9589;pointer-events:none}
.wb-project-search .search{display:block;width:100%;min-width:0;max-width:none;height:40px;padding:0 12px 0 34px;font-size:12px;background:#ffffff03;border-color:var(--wb-line)}
.wb-project-search .search:focus{outline:2px solid var(--wb-focus);outline-offset:2px}
.wb-sort-label{display:block;min-width:0;flex:none}
.wb-sort{min-height:40px;max-width:160px;padding:0 28px 0 10px;background:#181d18;border:1px solid var(--wb-line);border-radius:9px;color:#bac1b5;font-size:12px;cursor:pointer}
.wb-view-switch{display:flex;padding:2px;background:#ffffff02;border:1px solid var(--wb-line);border-radius:10px;flex:none}
.wb-view-switch .wb-icon-button{min-width:33px;width:33px;min-height:34px;border-radius:7px}
.wb-view-switch [aria-pressed=true]{background:#2b3029;color:#edbd8a;border-color:#ffffff08}
.wb-project-count{font-size:12px;color:#97a08f;font-variant-numeric:tabular-nums;padding-bottom:3px}
[data-workbench] .section-head{margin-bottom:16px;flex-direction:row;align-items:end;gap:14px}
.wb-project-tile{position:relative;min-width:0;isolation:isolate}
.wb-project-tile .project-card{display:flex;flex-direction:column;width:100%;height:100%;min-width:0;transition:border-color .2s,box-shadow .2s;transform:none!important}
.wb-project-tile .card-art{flex:none;width:100%}
.wb-project-tile .card-body{width:100%;flex:1;display:flex;flex-direction:column;padding:18px}
.wb-project-tile .card-title{padding-right:3px}
.wb-project-tile .card-title strong{font-size:13px;line-height:1.5}
.wb-project-tile .card-body p{font-size:12px;line-height:1.65;min-height:39px;-webkit-line-clamp:2}
.wb-project-tile .card-foot{padding-top:14px;margin-top:auto;font-size:10px;gap:8px;align-items:center}
.wb-project-tile .card-foot>span:first-child{border:1px solid var(--wb-line);border-radius:5px;padding:3px 6px;background:#ffffff02;color:#b1baaa}
.wb-project-tile:focus-within .project-card,.wb-project-tile:hover .project-card{border-color:#76664f;box-shadow:0 8px 24px #0002}
.wb-star{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;border:1px solid #ffffff17;border-radius:50%;background:#121812cf;color:#abb3a3;z-index:5;cursor:pointer;transition:background .18s,color .18s,border-color .18s;box-shadow:0 3px 10px #0002}
.wb-star svg{width:16px;height:16px}
.wb-star:hover{background:#302a20;color:#f3c18c}
.wb-star[aria-pressed=true]{color:#edbb87;border-color:#edbb8740;background:#34291ded}
.wb-star[aria-pressed=true] svg{fill:#edbb8725}
.project-grid.wb-list-view{display:flex;flex-direction:column;gap:9px}
.wb-list-view .project-card{display:grid;grid-template-columns:94px minmax(0,1fr);min-height:112px;align-items:stretch}
.wb-list-view .card-art{height:100%;min-height:112px;border-bottom:0;border-right:1px solid var(--wb-line);border-radius:12px 0 0 12px}
.wb-list-view .card-body{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-content:center;column-gap:18px;padding:18px 60px 18px 20px}
.wb-list-view .card-title{grid-column:1;grid-row:1;margin:0 0 5px}
.wb-list-view .card-body p{grid-column:1;grid-row:2;min-height:0;-webkit-line-clamp:1}
.wb-list-view .card-foot{grid-column:2;grid-row:1/3;flex-direction:column;justify-content:center;align-items:flex-end;padding:0;margin:0;gap:6px}
.wb-list-view .wb-star{top:calc(50% - 18px);background:#1e241c}
.wb-list-view .card-art .studio-cover-object{width:70px;height:70px;left:calc(50% - 35px);top:calc(50% - 35px);transform:scale(.8)!important}
.wb-list-view .studio-cover-glyph{font-size:18px}
.wb-list-view .studio-cover-index,.wb-list-view .studio-cover-caption{display:none}
.wb-library-empty{border:1px dashed #515747;border-radius:16px;text-align:center;padding:45px 22px;background:radial-gradient(ellipse at 50% 0%,#c0c8a108,transparent 65%);color:var(--muted)}
.wb-library-empty>svg{width:30px;height:30px;color:#c8b291;margin:0 0 12px}
.wb-library-empty h3{font-size:20px;color:#e2e3da;margin-bottom:8px}
.wb-library-empty p{font-size:13px;line-height:1.65;max-width:370px;margin:auto}
.wb-library-empty button{margin-top:20px;font-size:12px}
/* Dialog is outside #app so existing auth/Apple dialogs are never reused. */
.wb-palette,.wb-guide{color:#efefe7;color-scheme:dark;padding:0;border:1px solid #5d5b50;border-radius:18px;background:linear-gradient(145deg,#20251f,#161a16 70%);box-shadow:0 30px 110px #0009;max-height:min(76dvh,690px);width:min(620px,calc(100vw - 32px));max-width:calc(100vw - 32px);overflow:hidden}
.wb-palette[open]{display:flex;flex-direction:column}
.wb-palette::backdrop,.wb-guide::backdrop{background:#050805b0;backdrop-filter:blur(6px)}
.wb-palette-heading{display:flex;align-items:center;justify-content:space-between;padding:22px 22px 14px;gap:15px;flex:none}
.wb-palette-heading>div{min-width:0}
.wb-palette-heading h2{font-size:23px;line-height:1.25;letter-spacing:-.035em;font-weight:550;margin:6px 0 0;color:#efefe7}
.wb-eyebrow{color:#bba78d;font-size:9px;font-weight:600;letter-spacing:.14em}
.wb-palette-heading .wb-icon-button{color:#b8c0af}
.wb-palette-search{margin:0 20px 14px;display:flex;align-items:center;gap:10px;background:#0f140f;border:1px solid #6e6756;border-radius:10px;padding:0 14px;min-height:48px;flex:none}
.wb-palette-search:focus-within{border-color:#e2ba8d;box-shadow:0 0 0 3px #e2ba8d10}
.wb-palette-search svg{width:18px;height:18px;color:#cdb088;flex:none}
.wb-palette-search input{min-width:0;width:100%;min-height:48px;background:transparent;border:0;outline:none!important;padding:0;color:#f3f2e9;font-family:inherit;font-size:14px;line-height:1.5}
.wb-palette-search input::placeholder{color:#84917f;font-size:13px}
.wb-command-results{padding:0 10px 12px;overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;scrollbar-width:thin;scrollbar-gutter:stable}
.wb-result-group{padding:12px 12px 6px;font-size:9px;font-weight:600;letter-spacing:.12em;color:#97a18e}
.wb-result{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid transparent;border-radius:10px;min-width:0;min-height:62px;cursor:pointer;color:#b8c2ae}
.wb-result[aria-selected=true]{background:linear-gradient(105deg,#e5b17414,#e5b17406);border-color:#bb9b7345;color:#f0e4d1}
.wb-result:hover{background:#ffffff06}
.wb-result-icon{display:grid;place-items:center;border:1px solid #ffffff0c;background:#ffffff03;border-radius:9px;width:33px;height:33px;flex:none}
.wb-result-icon svg{width:16px;height:16px}
.wb-result-copy{display:grid;gap:4px;flex:1;min-width:0}
.wb-result-copy strong{font-weight:520;font-size:13px;overflow-wrap:anywhere;line-height:1.4}
.wb-result-copy small{color:#91a087;font-size:11px;line-height:1.4}
.wb-result-arrow{color:#bba482;opacity:0;flex:none}
.wb-result-arrow svg{width:15px;height:15px}
.wb-result[aria-selected=true] .wb-result-arrow{opacity:1}
.wb-command-empty{font-size:13px;text-align:center;color:#aab4a2;padding:25px 20px 36px}
.wb-palette-footer{display:flex;justify-content:space-between;gap:12px;flex:none;border-top:1px solid #ffffff0d;background:#0e120e40;color:#8c9983;font-size:10px;padding:12px 22px}
.wb-palette-footer>span{display:flex;align-items:center;gap:5px}
.wb-palette kbd,.wb-guide kbd{font:10px/1.5 ui-monospace,SFMono-Regular,monospace;color:#b6c1ac;border:1px solid #ffffff15;border-radius:4px;padding:1px 4px;white-space:nowrap}
.wb-guide{overflow:auto;padding-bottom:22px;max-width:550px}
.wb-help-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 22px;padding:14px 0;border-bottom:1px solid #ffffff0c;font-size:12px}
.wb-help-row kbd{white-space:normal;text-align:right}
.wb-help-note{font-size:11px;color:#94a289;margin:20px 22px 0;line-height:1.65}
/* Reading controls keep content as text. No markdown evaluation or raw HTML. */
[data-workbench] .chat-head{gap:8px}
.wb-chat-label{flex:1}
.wb-chat-search{margin-left:auto;min-width:34px;width:34px;min-height:34px}
[data-workbench] .chat-head [data-history]{font-size:11px}
[data-workbench] .chat-message{position:relative}
[data-workbench] .chat-message .author{min-height:28px;padding:3px 34px 4px 0;margin-bottom:5px;letter-spacing:.055em;color:#a0a993;font-size:9px}
[data-workbench] .chat-message.user{background:linear-gradient(125deg,#282e2490,#20261e70);border-color:#8e947229}
[data-workbench] .chat-message.system{padding-left:12px;border-left:2px solid #4d5845;color:#a0aa96}
[data-workbench] .chat-message.system .author{color:#86927b}
.wb-copy-message{position:absolute;right:0;top:0;display:grid;place-items:center;width:28px;height:28px;min-height:28px;min-width:28px;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;color:#a9b69c;opacity:0;cursor:pointer;transition:opacity .14s,background .14s}
.chat-message.user .wb-copy-message{top:9px;right:10px}
.wb-copy-message svg{width:13px;height:13px}
.chat-message:hover>.wb-copy-message,.chat-message:focus-within>.wb-copy-message{opacity:1}
.wb-copy-message:hover,.wb-copy-message.copied{background:#d2debe0b;border-color:#a5b09330;color:#e7c69b;opacity:1}
.wb-message-found{outline:2px solid #e5b174;outline-offset:8px;border-radius:5px}
[data-workbench] .composer-note{color:#98a18d}
[data-workbench] .tab:focus-visible{outline-offset:-5px;border-radius:6px}
[data-workbench] .pane:focus-visible{outline:1px solid var(--wb-focus);outline-offset:-3px}
@container(max-width:900px){.wb-library-toolbar{align-items:stretch}.wb-library-tools{flex-basis:100%;justify-content:flex-start}.wb-project-search{max-width:none}.wb-list-view .card-body{grid-template-columns:minmax(0,1fr);padding-block:13px}.wb-list-view .card-foot{grid-column:1;grid-row:3;flex-direction:row;justify-content:flex-start;align-items:center;margin-top:9px}.wb-list-view .project-card{min-height:128px}}
@media(max-width:1050px){.wb-command-trigger{min-width:38px;width:38px;min-height:36px;justify-content:center;padding:0}.wb-command-trigger>span,.wb-command-trigger>kbd{display:none}}
@media(max-width:820px){
 [data-workbench] .topbar{padding-inline:12px}.wb-library-toolbar{gap:12px}.wb-library-tools{flex-wrap:wrap;gap:8px;flex-basis:100%}.wb-project-search{flex-basis:100%;max-width:none}.wb-library-filters{align-self:flex-start}.wb-view-switch{margin-left:auto}.wb-sort{max-width:100%;min-height:42px}.wb-sort-label{flex:1}.wb-view-switch .wb-icon-button{width:40px;min-height:38px}.wb-filter{min-height:38px}.wb-star{width:40px;height:40px;min-width:40px;min-height:40px}.wb-project-tile .card-body p{font-size:13px}.wb-project-tile .card-title strong{font-size:14px}.wb-project-tile .card-foot{font-size:10px}.wb-list-view .project-card{grid-template-columns:76px minmax(0,1fr)}.wb-list-view .card-body{padding-left:13px;padding-right:54px}.wb-list-view .card-title .mini{display:none}.wb-list-view .card-foot{flex-wrap:wrap}.wb-list-view .wb-star{top:15px;right:9px}.wb-list-view .studio-cover-object{transform:scale(.67)!important}.wb-project-count{font-size:11px}
 .wb-palette,.wb-guide{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 32px);border-radius:15px}.wb-palette{margin:12px auto}.wb-palette-heading{padding:18px 15px 13px}.wb-palette-heading h2{font-size:21px}.wb-palette-search{margin:0 13px 10px}.wb-palette-search input{font-size:16px}.wb-palette-search input::placeholder{font-size:13px}.wb-command-results{padding-inline:6px}.wb-result{padding:12px 9px}.wb-result-copy strong{font-size:13px}.wb-palette-footer{padding:12px 15px;font-size:9px}.wb-palette-footer span:first-child{display:none}.wb-palette-footer{justify-content:flex-end}.wb-palette-heading .wb-icon-button{width:40px;min-width:40px;min-height:40px}.wb-help-row{flex-wrap:wrap}.wb-copy-message{opacity:.7;width:32px;height:32px}.wb-chat-search{width:40px;min-width:40px;min-height:40px}
 [data-workbench] .top-actions{gap:4px}
}
@media(max-width:380px){[data-workbench] .top-actions .button.light{min-width:36px;min-height:36px;padding:0 7px}[data-workbench] .top-actions .icon-button{min-width:34px;width:34px}.wb-command-trigger{min-width:34px;width:34px}.wb-palette-heading h2{font-size:19px}.wb-eyebrow{font-size:8px}}
@media(hover:none){.wb-copy-message{opacity:.8}}
@media(prefers-reduced-motion:reduce){.wb-palette,.wb-guide,.wb-star,.wb-command-trigger,.wb-icon-button,.wb-copy-message,.wb-filter{transition:none!important;animation:none!important}}
@media(max-width:820px){.layout-reset.wb-icon-button{display:none}}
[data-workbench] .card-foot{color:#9ca694}
@media(forced-colors:active){.wb-list-view .project-card{grid-template-columns:minmax(0,1fr)}.wb-star,.wb-command-trigger,.wb-palette,.wb-guide,.wb-filter{border:1px solid ButtonText}.wb-result[aria-selected=true]{outline:2px solid Highlight}.wb-message-found{outline-color:Highlight}}
