.style-library { min-height:0; overflow:auto; color:#38363b; font:inherit; padding:3px; }
.style-library *, .style-library *::before, .style-library *::after { box-sizing:border-box; }
.style-library [hidden] { display:none!important; }
.style-library button, .style-library input, .style-library textarea { font:inherit; color:inherit; }
.style-library button { cursor:pointer; }
.style-library button:disabled { opacity:.5; cursor:default; }
.style-library .library-add-actions { display:flex; gap:10px; margin-bottom:20px; flex-wrap:wrap; }
.style-library .library-add-actions button, .style-library .library-form-actions button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:9px 16px; border:0; border-radius:6px; background:#f3f3f3; box-shadow:none; }
.style-library .library-add-actions button:hover, .style-library .library-form-actions button:hover { background:#eae8eb; }
.style-library svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.style-library .library-status { margin:0 0 16px; font-size:14px; }
.style-library .library-status:empty { display:none; }
.style-library .library-status a { text-decoration:underline; }
.style-library .library-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:24px 16px; align-content:start; }
.style-library .library-card { min-width:0; }
.style-library .library-choice { display:block; width:100%; padding:0; border:0; background:none; text-align:left; }
.style-library .library-preview { display:flex; position:relative; align-items:center; justify-content:center; aspect-ratio:1; overflow:hidden; background:#f4f3f1; }
.style-library .library-preview img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; transition:transform .2s; }
.style-library .library-preview-photo[aria-busy=true] { background-image:url(/images/site/loadingBall.svg); background-position:center; background-size:24px 24px; background-repeat:no-repeat; }
.style-library .library-choice:hover img { transform:scale(1.03); }
.style-library .library-preview-text { padding:20px; }
.style-library .library-preview-text>span { display:-webkit-box; -webkit-line-clamp:6; -webkit-box-orient:vertical; overflow:hidden; line-height:1.5; font-size:14px; overflow-wrap:anywhere; }
.style-library .library-choice[aria-pressed=true] .library-preview::after { content:'✓'; position:absolute; right:8px; bottom:8px; display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#403c43; color:#fff; }
.style-library .library-name { display:block; margin-top:8px; font-size:14px; overflow-wrap:anywhere; }
.style-library .library-card-actions { display:flex; gap:14px; margin-top:2px; }
.style-library .library-card-actions button { border:0; background:none; color:inherit; }
.style-library .library-card-actions .library-icon-action { display:inline-flex; align-items:center; justify-content:flex-end; flex:none; width:44px; height:44px; padding:0; color:#7c7a7d; border-radius:4px; }
.style-library .library-icon-action:hover { background:#f3f3f3; color:#38363b; }
.style-library .library-card-footer { align-items:start; gap:4px; }
.style-library .library-card-footer .library-name { flex:1; min-width:0; margin:0; min-height:44px; padding:10px 0; text-align:left; line-height:24px; cursor:text; }
.style-library .library-choice[data-library-field] { cursor:text; }
.style-library .library-inline-editor { min-width:0; }
.style-library .library-inline-editor :is(input,textarea) { display:block; width:100%; border:1px solid #bcb8c0; border-radius:3px; background:#fff; font-size:14px; outline-offset:2px; }
.style-library .library-inline-name { flex:1; }
.style-library .library-inline-name [contenteditable] { border:0; background:none; outline:none; box-shadow:none; }
.style-library .library-inline-description textarea { aspect-ratio:1; min-height:0; padding:20px; resize:vertical; line-height:1.5; }
.style-library .library-inline-editor[aria-busy=true] { opacity:.65; }
.style-library .library-inline-editor .library-form-error { margin-top:6px; }
.style-library .library-empty { grid-column:1/-1; color:#7c7a7d; padding:15px 0; }
.style-library .library-form { display:grid; gap:15px; max-width:540px; padding:20px; margin:0 0 24px; background:#f8f7f6; border-radius:8px; }
.style-library .library-form-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:-8px -8px -4px 0; }
.style-library .library-close { display:inline-flex; align-items:center; justify-content:center; flex:none; width:44px; height:44px; padding:0; border:0; border-radius:4px; background:none; }
.style-library .library-close:hover { background:#eae8eb; }
.style-library .library-form h3 { font-size:17px; font-weight:500; margin:0; }
.style-library .library-form label { display:grid; gap:6px; font-size:14px; }
.style-library .library-form input, .style-library .library-form textarea { width:100%; min-width:0; padding:10px 12px; border:1px solid #d6d2d9; border-radius:4px; background:#fff; outline-offset:2px; box-shadow:none; }
.style-library .library-form textarea { resize:vertical; min-height:100px; }
.style-library .library-form-actions { display:flex; gap:8px; }
.style-library .library-form-actions button:first-child { background:#403c43; color:#fff; }
.style-library .library-edit-photo { width:120px; height:120px; object-fit:contain; background:#eee; }
.style-library .library-form-error { font-size:14px; color:#923c3c; margin:0; }
.style-library .library-form-error:empty { display:none; }
.style-library :is(button,input,textarea):focus-visible { outline:2px solid #403c43; outline-offset:3px; }
.library-drive-nav { margin-bottom:24px; }
.library-drive-nav a { padding:8px 12px; }
.library-drive-nav [aria-current=page] { background:#f0eeeb; border-radius:20px; }
#imageStudio .style-library .library-add-actions button, #imageStudio .style-library .library-form-actions button { padding:9px 16px; background:#f3f3f3; }
#imageStudio .style-library .library-form-actions button:first-child { background:#403c43; color:#fff; }
#imageStudio .style-library .library-form :is(input,textarea) { padding:10px 12px; border:1px solid #d6d2d9; border-radius:4px; background:#fff; }
.style-library .library-form textarea, #imageStudio .style-library .library-form textarea { border:0; outline:none; box-shadow:none; }
.style-library .library-form-actions .library-save, #imageStudio .style-library .library-form-actions .library-save { width:44px; height:44px; padding:0; border-radius:50%; }
#imageStudio .style-library .library-status { margin-bottom:16px; }
#imageStudio .style-library .library-empty { padding:15px 0; }
#imageStudio .style-library .library-card-actions .library-icon-action { padding:0; }
#imageStudio .studio-library-mount { min-height:0; overflow:auto; }
@media(max-width:600px) {
  .style-library .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 12px; }
  .style-library .library-preview-text { padding:14px; }
  .style-library .library-inline-description textarea { padding:14px; }
  .style-library .library-add-actions { gap:8px; }
  .style-library .library-add-actions button { padding:9px 12px; }
  .style-library .library-form { padding:14px; }
}
@media(prefers-reduced-motion:reduce) { .style-library .library-preview img { transition:none; } }

/* Inline text keeps its plain appearance while saving and after Enter restores focus. */
.style-library .library-card-footer .library-name:is(:focus,:focus-visible) { outline:none; box-shadow:none; border:0; }
.style-library .library-card-footer button.library-name:focus-visible { text-decoration:underline; text-decoration-color:#bcb8c0; text-underline-offset:4px; }

.style-library.library-create-empty { grid-column:1/-1; width:100%; max-width:540px; margin:40px auto 20px; padding:20px; color:#38363b; }
.style-library.library-create-empty h3 { font-size:18px; font-weight:500; line-height:1.4; margin:0 0 28px; }
.style-library .library-browse-all, #imageStudio .style-library .library-browse-all { display:inline-block; margin-bottom:32px; color:#7c7a7d; font-size:14px; text-decoration:underline; text-underline-offset:3px; }
.style-library .library-create-actions { display:flex; gap:10px; }
.style-library .library-create-actions button, #imageStudio .style-library .library-create-actions button { min-height:44px; padding:9px 16px; border:0; border-radius:6px; background:#f3f3f3; }
.style-library .library-create-actions button:first-child, #imageStudio .style-library .library-create-actions button:first-child { background:#403c43; color:#fff; }
.style-library .library-create-status, #imageStudio .style-library .library-create-status { margin:12px 0; font-size:14px; color:#923c3c; }
.style-library .library-create-status:empty { display:none; }
.style-library .library-suggest-inline, #imageStudio .style-library .library-suggest-inline { padding:4px 0; background:none; border:0; font-size:14px; text-decoration:underline; text-underline-offset:3px; }
.style-library .library-suggest-status, #imageStudio .style-library .library-suggest-status { margin:12px 0; color:#7c7a7d; font-size:14px; line-height:1.4; }
.style-library .library-suggest-status:empty { display:none; }
.style-library .library-suggestion-list { display:grid; gap:8px; }
.style-library .library-suggestion, #imageStudio .style-library .library-suggestion { display:grid; gap:6px; width:100%; padding:14px; border:0; border-radius:8px; background:#f8f7f6; color:#38363b; text-align:left; }
.style-library .library-suggestion:hover, #imageStudio .style-library .library-suggestion:hover { background:#efedeb; }
.style-library .library-suggestion strong { font-size:15px; font-weight:600; }
.style-library .library-suggestion span { font-size:14px; line-height:1.5; }
.style-library.library-create-empty .library-create-status, #imageStudio .style-library.library-create-empty .library-create-status,
.style-library.library-create-empty .library-suggest-status, #imageStudio .style-library.library-create-empty .library-suggest-status { margin:24px 0 16px; }
.style-library.library-create-empty .library-suggestion-list { gap:12px; }
@media(max-width:600px) {
  .style-library.library-create-empty { margin-top:20px; padding:12px 0; }
  .style-library.library-create-empty h3 { margin-bottom:24px; }
  .style-library .library-browse-all, #imageStudio .style-library .library-browse-all { margin-bottom:24px; }
}
