.feature-panel{background:#fff;padding:24px;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 1px 2px #0f172a08;color:#334155}
.feature-panel h2,#library-editor h2{font-size:22px;font-weight:700;color:#0f172a}
.feature-panel h3{font-size:17px;font-weight:700;color:#0f172a}
.feature-panel p{margin:8px 0;line-height:1.65}
.feature-muted{color:#64748b;font-size:12px}
.feature-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.feature-panel label,#library-editor label{display:block;font-size:13px;font-weight:600;margin-bottom:12px}
.feature-panel input:not([type=checkbox]),.feature-panel select,#library-editor input:not([type=hidden]),#library-editor textarea,#library-editor select{display:block;width:100%;margin-top:5px;border:1px solid #cbd5e1;border-radius:5px;padding:9px 10px;background:#fff;color:#0f172a;font:inherit;font-weight:400;min-width:0}
#forum-mail-form{max-width:620px;margin:16px 0}
.feature-check{display:flex!important;gap:8px;align-items:center}
.feature-primary,.feature-secondary,.library-pages button{display:inline-block;border-radius:5px;padding:9px 15px;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none}
.feature-primary{background:#2563eb;color:#fff}.feature-primary:hover{background:#1d4ed8}
.feature-secondary,.library-pages button{border:1px solid #cbd5e1;background:#fff;color:#334155}
.feature-panel button:disabled,#library-editor fieldset:disabled{opacity:.5;cursor:wait}
.feature-panel :focus-visible,#library-editor :focus-visible{outline:3px solid #38bdf8;outline-offset:3px}
.library-filters{display:grid;grid-template-columns:2fr 1fr 1fr auto;align-items:end;gap:12px;margin:20px 0}
.library-filters label{margin:0}.library-filters>button{margin-bottom:1px}
.library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:18px}
.library-card{display:flex;flex-direction:column;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;min-width:0}
.library-picture{height:185px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;color:#64748b;font-size:13px}
.library-picture img{width:100%;height:100%;object-fit:contain;padding:8px}
.library-image-button{position:relative;display:block;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:zoom-in}
.library-image-button:hover{background:#e2e8f0}
.library-image-button:focus-visible{outline:3px solid #2563eb;outline-offset:-3px}
.library-image-hint{position:absolute;bottom:12px;right:12px;border-radius:4px;padding:4px 8px;background:#0f172acc;color:#fff;font-size:11px;pointer-events:none}
html.library-image-open{overflow:hidden}
.library-image-viewer{box-sizing:border-box;width:min(1120px,calc(100vw - 32px));max-width:none;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:18px;border:0;border-radius:10px;background:#fff;color:#334155;overflow:auto;box-shadow:0 20px 60px #0006}
.library-image-viewer::backdrop{background:#0f172acc}
.library-image-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.library-image-heading h2{font-size:17px;line-height:1.5;font-weight:700;overflow-wrap:anywhere;min-width:0}
.library-image-heading button{flex-shrink:0;min-height:44px}
.library-image-viewer :focus-visible{outline:3px solid #38bdf8;outline-offset:3px}
.library-image-stage{display:flex;align-items:center;justify-content:center;min-height:80px;background:#f1f5f9;border-radius:5px}
.library-image-stage img{display:block;max-width:100%;width:auto;height:auto;max-height:calc(100vh - 200px);max-height:calc(100dvh - 200px);object-fit:contain}
.library-image-stage img[hidden]{display:none}
.library-image-status{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.library-image-status:not(:empty){padding:12px 0}
#library-image-help{margin:12px 0 0;font-size:12px;line-height:1.6;color:#64748b}
.library-card-body{padding:16px;display:flex;flex-direction:column;gap:10px;flex:1}
.library-tags{display:flex;flex-wrap:wrap;gap:5px;font-size:11px}
.library-tag{background:#eff6ff;color:#1e40af;padding:3px 7px;border-radius:4px}
.library-tag-standard{background:#fef3c7;color:#92400e}
.library-card h3{font-size:16px;overflow-wrap:anywhere}
.library-description{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;max-height:125px;overflow:auto;margin:0!important}
.library-file-info{font-size:11px;color:#64748b;overflow-wrap:anywhere;margin:0!important}
.library-actions{margin-top:auto;display:flex;flex-direction:column;gap:8px}
.library-admin-actions{display:flex;gap:8px;border-top:1px solid #e2e8f0;padding-top:10px;margin-top:4px}
.library-admin-actions button{font-size:12px;color:#475569;text-decoration:underline}
.library-pages{display:flex;justify-content:center;align-items:center;gap:18px;margin-top:24px;font-size:13px}
#library-editor{width:min(760px,calc(100vw - 32px));max-height:90vh;padding:24px;border:0;border-radius:10px;color:#334155}
#library-editor::backdrop{background:#0f172a99}
#library-editor textarea{resize:vertical}
#library-editor .library-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
#library-editor fieldset>*{margin-top:14px}
@media(max-width:1000px){.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.library-filters{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.feature-panel{padding:16px}.library-grid{grid-template-columns:1fr}.library-filters,#library-editor .library-filters{grid-template-columns:1fr}.feature-heading>button{width:100%}#library-editor{padding:18px}.feature-panel h2{font-size:20px}}
@media(max-width:640px){#community-header{flex-direction:column;align-items:stretch;gap:12px}#community-header>a{font-size:17px;line-height:1.5}#nav-actions{justify-content:flex-end;min-width:0}#nav-user-container{min-width:0}#nav-user{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#nav-auth-btn{white-space:nowrap;flex-shrink:0}}
