/* Scoped to concept discovery; colors follow the existing light/dark tokens. */
.lf-drawer{padding:0;width:min(560px,100vw - 16px);max-width:none;max-height:90dvh;margin:auto auto 8px;border:1px solid var(--line);border-radius:18px;background:var(--panel-bg,var(--bg));color:var(--ink);overflow:auto}
.lf-drawer::backdrop{background:#211a22bb;backdrop-filter:blur(3px)}
.lf-drawer .lf-sidebar{position:static;max-height:none;border:0;overflow:visible}
#gallery .lf-toolbar{display:flex;gap:10px;margin:14px 0}
#gallery .lf-toolbar button,:is(#gallery,.lf-drawer) .lf-sidebar button,:is(#gallery,.lf-drawer) .lf-summary button{min-height:44px;font-size:12px}
#gallery .lf-layout{display:grid;grid-template-columns:minmax(230px,280px) minmax(0,1fr);gap:22px;align-items:start}
#gallery .lf-content,:is(#gallery,.lf-drawer) .lf-sidebar,:is(#gallery,.lf-drawer) .lf-category{min-width:0}
:is(#gallery,.lf-drawer) .lf-sidebar{position:sticky;top:12px;max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--panel-bg,var(--bg));scrollbar-gutter:stable}
:is(#gallery,.lf-drawer) .lf-sidehead{display:flex;align-items:center;justify-content:space-between;gap:8px}
:is(#gallery,.lf-drawer) .lf-sidehead h3{font:20px Georgia,serif;margin:6px 0}
:is(#gallery,.lf-drawer) .lf-sidehead button{padding:8px}
:is(#gallery,.lf-drawer) .lf-category{border-bottom:1px solid var(--line)}
:is(#gallery,.lf-drawer) .lf-category h3{margin:0;font:inherit}
:is(#gallery,.lf-drawer) .lf-heading{display:flex;align-items:center;gap:9px;width:100%;padding:12px 4px;border:0;border-radius:4px;text-align:left;background:transparent;color:var(--ink);font-weight:600}
:is(#gallery,.lf-drawer) .lf-count{margin-left:auto;color:var(--rose);font-size:12px;min-width:25px;text-align:center}
:is(#gallery,.lf-drawer) .lf-chevron{font-size:24px;line-height:1;transition:transform .18s;display:block}
:is(#gallery,.lf-drawer) .is-open .lf-chevron{transform:rotate(90deg)}
:is(#gallery,.lf-drawer) .lf-panel{padding:0 0 12px;animation:lf-reveal .18s ease-out}
:is(#gallery,.lf-drawer) .lf-search-label{display:block;font-size:12px;color:var(--ink);margin:3px 0 8px}
:is(#gallery,.lf-drawer) .lf-search{display:flex;gap:5px;align-items:center;min-width:0}
:is(#gallery,.lf-drawer) .lf-search input{min-width:0;width:100%;font-size:16px;min-height:44px}
:is(#gallery,.lf-drawer) .lf-search button{font-size:11px;padding:7px;flex:0 0 auto}
:is(#gallery,.lf-drawer) .lf-option-count,:is(#gallery,.lf-drawer) .lf-note{font-size:11px;line-height:1.7;color:var(--muted);margin:10px 0}
:is(#gallery,.lf-drawer) .lf-options{display:grid;grid-template-columns:minmax(0,1fr);gap:7px;max-height:340px;overflow:auto;padding:4px;scrollbar-gutter:stable}
:is(#gallery,.lf-drawer) .lf-option{display:flex;align-items:center;gap:9px;min-height:44px;margin:0;padding:9px;background:var(--control-bg,var(--bg));border:1px solid var(--line);border-radius:8px;color:var(--ink);cursor:pointer;font-size:12px;line-height:1.4;transition:background .15s,border-color .15s;box-sizing:border-box;min-width:0}
:is(#gallery,.lf-drawer) .lf-option:has(input:checked){background:var(--soft-bg);border-color:var(--rose);box-shadow:inset 3px 0 var(--rose)}
:is(#gallery,.lf-drawer) .lf-option:hover{border-color:var(--rose);box-shadow:0 2px 8px #c997821a}
:is(#gallery,.lf-drawer) .lf-option input{appearance:auto;width:18px;height:18px;min-width:18px;margin:0;accent-color:var(--rose);flex:0 0 auto}
:is(#gallery,.lf-drawer) .lf-option-text{min-width:0;overflow-wrap:anywhere}
:is(#gallery,.lf-drawer) .lf-option small{display:block;font-size:10px;color:var(--muted);margin-top:4px}
:is(#gallery,.lf-drawer) .lf-clear,:is(#gallery,.lf-drawer) .lf-load{width:100%;margin-top:8px}
:is(#gallery,.lf-drawer) .lf-sidebar>label{display:grid;gap:7px;margin:14px 0;color:var(--ink);font-size:12px}
:is(#gallery,.lf-drawer) .lf-sidebar :is(select,input){max-width:100%;box-sizing:border-box}
:is(#gallery,.lf-drawer) .lf-empty{font-size:12px;line-height:1.7;color:var(--muted)}
:is(#gallery,.lf-drawer) .lf-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 18px;font-size:12px}
:is(#gallery,.lf-drawer) .lf-chips{display:flex;gap:6px;flex-wrap:wrap;min-width:0;flex:1 1 200px}
:is(#gallery,.lf-drawer) .lf-chip{max-width:100%;border-radius:20px;padding:7px 11px;background:var(--soft-bg);color:var(--ink);overflow-wrap:anywhere;text-align:left}
#gallery .lf-collapsed,#gallery .lf-saved{grid-template-columns:minmax(0,1fr)}
#gallery .lf-content .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#gallery .lf-collapsed .grid,#gallery .lf-saved .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
#gallery .lf-content #generationpanel{padding:15px}
#gallery .lf-content .generatecontrols{gap:8px}
#gallery .lf-content .generatecontrols>label{flex:1 1 120px;min-width:0}
#gallery .lf-content .generatecontrols select{width:100%;max-width:100%}
:is(#gallery,.lf-drawer) :is(.lf-sidebar,.lf-summary,.lf-toolbar) :is(button,input,select):focus-visible{outline:3px solid var(--rose);outline-offset:3px}
:is(#gallery,.lf-drawer) .lf-option:focus-within{outline:3px solid var(--rose);outline-offset:1px}
:is(#gallery,.lf-drawer) .lf-done{width:100%;margin-top:12px}
@keyframes lf-reveal{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media(max-width:1100px){#gallery .lf-layout{gap:14px;grid-template-columns:minmax(220px,240px) minmax(0,1fr)}#gallery .lf-content .grid{grid-template-columns:minmax(0,1fr)}#gallery .lf-collapsed,#gallery .lf-saved{grid-template-columns:minmax(0,1fr)}#gallery .lf-collapsed .grid,#gallery .lf-saved .grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){#gallery .lf-layout{grid-template-columns:minmax(0,1fr)}:is(#gallery,.lf-drawer) .lf-sidebar{position:static;max-height:none;overflow:visible;padding:14px}:is(#gallery,.lf-drawer) .lf-options{max-height:300px}#gallery .lf-content .grid{grid-template-columns:repeat(2,minmax(0,1fr))}:is(#gallery,.lf-drawer) .lf-sidebar .lf-done{position:sticky;bottom:12px;z-index:2;box-shadow:0 2px 12px #0003}#gallery .lf-content .generatecontrols{flex-wrap:wrap}:is(#gallery,.lf-drawer) .lf-summary{align-items:start}}
@media(max-width:480px){#gallery .lf-content .grid{grid-template-columns:minmax(0,1fr)}#gallery .lf-content #blendbar{overflow-wrap:anywhere}#gallery .lf-content .customgrid{grid-template-columns:minmax(0,1fr)}#gallery .lf-content .addcustom input{min-width:0}:is(#gallery,.lf-drawer) .lf-sidehead{flex-wrap:wrap}:is(#gallery,.lf-drawer) .lf-search{flex-wrap:wrap}:is(#gallery,.lf-drawer) .lf-search input{flex:1 1 130px}}
@media(prefers-reduced-motion:reduce){:is(#gallery,.lf-drawer) .lf-panel{animation:none}:is(#gallery,.lf-drawer) .lf-chevron,:is(#gallery,.lf-drawer) .lf-option{transition:none}}
