.style-preset-toolbar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:16px 0}.style-preset-toolbar label{flex:1;min-width:180px;max-width:480px;margin:0}.style-preset-toolbar button{width:auto;min-height:44px;margin:0}.style-preset-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,390px),1fr));gap:20px}.style-preset-card{display:flex;flex-direction:column;gap:12px;padding:18px;border:1px solid #383838;border-radius:12px;background:#202020;min-width:0}.style-preset-card h3,.style-preset-card p{margin:0;overflow-wrap:anywhere}.style-preset-card>p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;color:#bdbdbd}.style-preset-card>button{align-self:flex-end;width:auto;min-height:44px;margin:auto 0 0}.style-preset-card .previs-style-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.style-preset-card figure{margin:0;min-width:0}.style-preset-card img{width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#121212}.style-preset-card figcaption{text-align:center;margin-top:6px;color:#bdbdbd}@media(max-width:600px){.style-preset-toolbar label{min-width:0}.style-preset-card{padding:12px}}

:is(#style-presets,#writing-presets) .style-preset-toolbar{align-items:center;gap:12px;margin:16px 0;min-width:0}
#style-preset-list .style-preset-card-actions{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:8px;width:100%;margin-top:auto}
#style-preset-list .style-preset-card-actions button{align-self:auto;width:auto;min-height:30px;height:30px;margin:0;padding:4px 10px;font-size:13px;line-height:20px;border-radius:8px}
:is(#style-presets,#writing-presets) .style-preset-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-right:auto}
:is(#style-presets,#writing-presets) .style-preset-tabs button{min-width:64px;text-align:center;white-space:nowrap}
:is(#style-presets,#writing-presets) .style-preset-tabs button[aria-pressed=true]{border-color:var(--lv-accent,#4cdbf6);color:var(--lv-accent,#4cdbf6);background:#202d30}
:is(#style-presets,#writing-presets) .style-preset-search{flex:0 1 280px;min-width:160px;margin:0;max-width:none}
:is(#style-presets,#writing-presets) .style-preset-search input{width:100%;min-width:0;min-height:44px;margin:0}
:is(#style-presets,#writing-presets) .style-preset-toolbar button:focus-visible{outline:2px solid var(--lv-accent,#4cdbf6);outline-offset:2px}
@media(max-width:600px){:is(#style-presets,#writing-presets) .style-preset-tabs{flex-basis:100%;margin:0}:is(#style-presets,#writing-presets) .style-preset-tabs button{flex:1;min-width:0;padding:8px}:is(#style-presets,#writing-presets) .style-preset-search{flex:1;min-width:0}:is(#style-presets,#writing-presets) .style-preset-toolbar{gap:10px}}

#style-preset-manage .style-manage-heading{gap:12px;margin:0;padding:0 0 16px;border-bottom:1px solid var(--lv-border,#3a3a3a)}
#style-manage-title{margin:0;overflow-wrap:anywhere}
.style-manage-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.style-manage-actions button{min-height:44px;margin:0;white-space:nowrap}
.style-manage-columns:not([hidden]){display:grid;grid-template-columns:minmax(150px,220px) minmax(0,1fr);gap:22px;align-items:start;margin-top:12px}
#style-manage-references{display:grid;gap:8px;padding-right:12px;border-right:1px solid var(--lv-border,#3a3a3a);min-width:0}
#style-manage-references button{display:grid;justify-items:center;align-items:center;gap:4px;min-width:0;margin:0;padding:4px 6px;font-size:13px}
#style-manage-references img{display:block;width:100%;height:min(16vh,144px);object-fit:contain}
#style-manage-editor button[aria-pressed=true]{color:var(--lv-accent,#4cdbf6);border-color:var(--lv-accent,#4cdbf6)}
#style-manage-status{margin:8px 0;overflow-wrap:anywhere}
#style-manage-status:empty{display:none}
#style-manage-editor{min-width:0}
#style-manage-editor .previs-writing-toolbar{justify-content:flex-end;gap:6px;margin:0}
#style-manage-editor .previs-writing-toolbar button{order:2;min-height:32px;margin:0;padding:4px 9px;font-size:13px}
#style-manage-editor .previs-writing-toolbar span{order:-1;margin:0}
#style-manage-test-result:not([hidden]){margin-top:12px}
#style-manage-test-status{margin:0;overflow-wrap:anywhere}
#style-manage-test-preview summary{width:fit-content;cursor:pointer;color:var(--lv-accent,#4cdbf6)}
#style-manage-test-preview a{display:block;width:min(100%,960px);margin-top:8px}
#style-manage-test-preview img{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:contain}
#style-manage-editor :is(.cm-editor,.previs-markdown-preview){height:clamp(440px,68dvh,840px);max-height:none}
#style-manage-editor .cm-scroller{max-height:none}
#style-preset-manage :is(a,button,select):focus-visible{outline:2px solid var(--lv-accent,#4cdbf6);outline-offset:2px}
@media(max-width:800px){
  .style-manage-columns:not([hidden]){grid-template-columns:minmax(0,1fr);gap:12px}
  #style-manage-references{grid-template-columns:repeat(3,minmax(0,1fr));padding:0;border:0}
  #style-manage-references img{height:min(20vw,120px)}
  #style-manage-editor :is(.cm-editor,.previs-markdown-preview){height:clamp(330px,58dvh,520px)}
}
