/* v4.1 — browse the collection, add material when needed.
   Scoped to the open-source library and its upload dialog. */
.community-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 29px;min-width:0}
.community-heading>div{min-width:0}
.community-heading h1{font:650 29px/1.35 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);letter-spacing:-.65px;margin:0;color:#25344e}
.community-heading h1>span{font-size:17px;font-weight:500;color:#7b89a1;margin-left:10px;letter-spacing:0}
.community-tools{display:flex;align-items:center;justify-content:flex-end;gap:20px;flex-shrink:0;max-width:65%}
.community-order{display:inline-flex;align-items:center;gap:7px;color:#66768e;font-size:14px;line-height:1.6;white-space:nowrap}
.community-order:before{content:"↓";font-size:16px;color:#8291aa;line-height:1}
.community-tools #resource-search{width:255px;max-width:100%;min-width:0;height:42px;padding:10px 13px;background:#fff;border:1px solid #dce4ef;border-radius:7px;font:14px/1.5 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);color:#314561;transition:border-color .15s,box-shadow .15s}
.community-tools #resource-search::placeholder{color:#7c8ba2}
.community-tools #resource-search:focus{border-color:#7b8dd8;box-shadow:0 0 0 3px #4a5dd50b}
#source-results .source-grid{gap:20px}
#source-results .source-card{padding:22px 23px;min-height:240px}
#source-results .source-card-top{align-items:center;justify-content:flex-start;gap:11px;min-height:29px;line-height:1.6;font-size:14px;color:#65748c}
#source-results .source-card-top>span{min-width:0;overflow-wrap:anywhere}
#source-results .source-card-top>span:last-child:not(.source-rank){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.source-rank{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-width:28px;height:28px;padding:0 5px;border-radius:6px;background:#f0f3f9;border:1px solid #e7ecf5;font:600 13px/1 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);font-variant-numeric:tabular-nums;color:#6e7d96}
#source-results .source-card:nth-child(-n+3) .source-rank{background:#edf0ff;border-color:#dde4ff;color:#5065c6}
#source-results .source-card h2{margin:18px 0 12px;font-size:20px;line-height:1.5;font-weight:600;letter-spacing:-.4px;color:#344766}
#source-results .source-card:hover h2{color:#4a5dd5}
#source-results .source-card>p{font-size:15px;line-height:1.9;color:#65768e;margin:0 0 24px;-webkit-line-clamp:4}
#source-results .source-card-bottom{padding-top:17px;border-top:1px solid #edf0f6;font-size:14px;line-height:1.6;color:#7b889e;align-items:center;gap:12px}
.resource-views{display:inline-flex;align-items:center;gap:6px;color:#657894;font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap}
.resource-views svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;flex-shrink:0}
#source-results .source-card-bottom time{font-size:13px;color:#77869d;font-variant-numeric:tabular-nums}
#source-results>.empty,#source-results .source-grid>.empty:only-child{grid-column:1/-1}
.community-launcher{position:fixed;right:25px;bottom:86px;z-index:59;display:flex;align-items:center;justify-content:center;gap:9px;min-height:47px;padding:12px 17px;background:#4a5dd5;border:1px solid #4a5dd5;border-radius:11px;color:#fff;font:500 14px/1.5 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);box-shadow:0 5px 18px #2a3f8e24;cursor:pointer;transition:background .15s,transform .15s}
.community-launcher:hover{background:#3d51c7;border-color:#3d51c7;transform:translateY(-2px)}
.community-launcher svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.community-launcher:disabled{cursor:wait;opacity:.65;transform:none}
.community-launcher[hidden]{display:none!important}

/* Native dialog keeps keyboard focus within the upload task. */
dialog.community-dialog{width:min(690px,calc(100vw - 36px));max-width:none;max-height:min(820px,calc(100dvh - 48px));padding:0;border:1px solid #dbe3f0;border-radius:13px;background:#fff;color:#344664;box-shadow:0 22px 80px #14244633;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;font:15px/1.75 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif)}
.community-dialog::backdrop{background:#17253e66;backdrop-filter:blur(4px)}
.community-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px;position:sticky;top:0;z-index:3;background:#fff;border-bottom:1px solid #e8edf5;padding:23px 26px 20px;border-radius:13px 13px 0 0}
.community-dialog-head h2{font:600 22px/1.4 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);letter-spacing:-.45px;margin:0;color:#2e4362}
.community-dialog-head>button{display:grid;place-items:center;min-width:34px;width:34px;height:34px;flex-shrink:0;padding:4px;border:1px solid #e1e7f1;border-radius:6px;background:#fff;color:#7789a6;font:20px/1 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);cursor:pointer}
.community-dialog-head>button:hover{background:#f0f4fb;border-color:#c9d5eb;color:#415c95}
.community-dialog-head>button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7}
#resource-upload-form{display:flex;flex-direction:column;gap:22px;margin:0;padding:25px 26px 27px;min-width:0}
.community-tabs{display:flex;align-items:center;gap:4px;width:fit-content;max-width:100%;padding:4px;background:#edf1f7;border:1px solid #e2e8f1;border-radius:8px}
.community-tabs button{padding:9px 18px;border:0;border-radius:5px;background:transparent;color:#6b7d98;font:500 14px/1.5 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);min-height:39px;cursor:pointer;white-space:nowrap}
.community-tabs button.active,.community-tabs button[aria-selected=true],.community-tabs button[aria-pressed=true]{background:#fff;color:#475cbe;box-shadow:0 1px 4px #2d42670b}
.community-tabs button:hover:not(.active){color:#4159ad;background:#f7f9fd}
.community-tabs button:disabled{opacity:.55;cursor:wait}
.community-pane{min-width:0;display:flex;flex-direction:column;gap:12px}
.community-pane[hidden]{display:none!important}
.community-pane>label:not(.community-dropzone),.community-dialog .field{display:flex;flex-direction:column;gap:9px;font-size:15px;color:#4a5f7d;min-width:0}
.community-dialog input:not([type=file]):not([type=checkbox]):not([type=radio]),.community-dialog textarea,.community-dialog select{box-sizing:border-box;width:100%;min-width:0;border:1px solid #d9e2ef;border-radius:7px;background:#fbfcff;padding:12px 13px;font:15px/1.7 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);color:#374d70;transition:border-color .15s}
.community-dialog input::placeholder,.community-dialog textarea::placeholder{color:#8594ad}
.community-dialog input:focus,.community-dialog textarea:focus,.community-dialog select:focus{border-color:#8698de}
.community-dialog textarea{min-height:180px;max-height:380px;resize:vertical}
.community-pane>p,.community-pane .subtle,.community-dialog .field small{font-size:14px;line-height:1.8;color:#7385a0;margin:0}
.community-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;min-height:196px;padding:27px 24px;background:#f8faff;border:1px dashed #bccce8;border-radius:9px;color:#6d82a5;text-align:center;cursor:pointer;transition:background .15s,border-color .15s;min-width:0}
.community-dropzone:hover,.community-dropzone.is-dragover{background:#f0f4ff;border-color:#8298d7}
.community-dropzone:focus-within{outline:3px solid #adbaf0;outline-offset:3px}
.community-dropzone>svg{width:31px;height:31px;fill:none;stroke:#7189c3;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.community-dropzone>strong{font-size:16px;font-weight:500;color:#4b6287;line-height:1.6}
.community-dropzone>span,.community-dropzone>p{font-size:14px;color:#7386a5;line-height:1.75;margin:0}
.community-dropzone input[type=file]{display:block;position:static;opacity:1;min-width:0;max-width:100%;width:auto;height:auto;margin:0;padding:0;border:0;background:none;font:14px/1.8 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);color:#7a8da9;cursor:pointer;clip-path:none}
.community-dropzone input[type=file]::file-selector-button{border:1px solid #cbd7ed;border-radius:6px;background:#fff;color:#586f9e;padding:8px 13px;margin-right:10px;font:500 14px/1.5 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);cursor:pointer}
.community-dropzone input[type=file]::file-selector-button:hover{border-color:#98aadd;background:#f0f4ff}
.community-file-list{display:flex;flex-direction:column;gap:8px;max-height:230px;overflow-y:auto;min-width:0;scrollbar-width:thin}
.community-file-list:empty{display:none}
.community-file{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#f6f8fc;border:1px solid #e5ebf5;border-radius:7px;padding:10px 12px;min-width:0;color:#506888;font-size:14px}
.community-file>span{min-width:0;overflow-wrap:anywhere;line-height:1.7}
.community-file>span small{display:block;font-size:13px;color:#7f90ab}
.community-file>button{display:grid;place-items:center;flex-shrink:0;min-width:31px;height:31px;padding:4px 8px;border:0;border-radius:5px;background:transparent;color:#8797af;font:14px/1.5 var(--studio-font,"Segoe UI","Microsoft YaHei",sans-serif);cursor:pointer}
.community-file>button:hover{background:#e9eef8;color:#425f97}
.community-settings{border-top:1px solid #e8edf5;padding-top:18px;margin:0}
.community-settings>summary{width:fit-content;font-size:14px;color:#7183a0;cursor:pointer;line-height:1.75}
.community-settings>summary:hover{color:#4d66ab}
.community-settings[open]>summary{margin-bottom:17px;color:#4e6891}
.community-settings .field{font-size:14px;gap:8px;margin:0}
.community-settings select{background:#fff;font-size:14px;max-width:100%}
.community-progress{font-size:14px;color:#526a9c;padding:12px 14px;border:1px solid #dae4f8;background:#f0f4fc;border-radius:7px;line-height:1.8;overflow-wrap:anywhere;margin:0}
.community-progress:empty,.community-progress[hidden]{display:none!important}
.community-error{font-size:14px;color:#b34e64;line-height:1.8;padding:12px 14px;background:#fff6f7;border:1px solid #f0dce2;border-radius:7px;overflow-wrap:anywhere;margin:0}
.community-error:empty,.community-error[hidden]{display:none!important}
.community-actions{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #e8edf5;padding-top:20px;margin:0;min-width:0}
.community-actions>span,.community-actions>p{font-size:14px;color:#7384a0;line-height:1.8;min-width:0;margin:0}
body:not(.auth-home) .community-actions .button.primary{font-size:14px;padding:11px 19px;min-height:44px;border-radius:7px;flex-shrink:0;white-space:nowrap}
.community-history{margin:0;padding-top:18px;border-top:1px solid #e8edf5;font-size:14px;color:#74849f}
.community-dialog>.community-history{margin:0 26px 26px}
.community-history>summary{font-size:14px;line-height:1.8;color:#6d80a0;cursor:pointer}
.community-history[open]>summary{margin-bottom:10px}
.community-history .clean-row{font-size:14px;gap:14px;padding:14px 0;color:#5a7091}
.community-history .clean-row strong{font-size:14px;font-weight:500;overflow-wrap:anywhere;color:#536b8e}
.community-history .clean-row>span:last-child{font-size:13px;color:#7a8ca9;flex-shrink:0}
.community-history>p{font-size:14px;color:#7e8faa;margin:12px 0 0}
.community-dialog [aria-busy=true]{cursor:progress}
body:not(.auth-home) .community-launcher:focus-visible,body:not(.auth-home) .community-dialog :focus-visible{outline:3px solid #8b9bdd;outline-offset:3px}

@media(max-width:1100px){.community-heading{align-items:flex-start;gap:18px}.community-tools{gap:13px;max-width:68%}.community-tools #resource-search{width:205px}.community-order{font-size:13px}#source-results .source-card{padding:21px;min-height:225px}}
@media(max-width:760px){.community-heading{display:flex;flex-direction:column;align-items:stretch;gap:20px;margin-bottom:23px}.community-heading h1{font-size:27px}.community-tools{width:100%;max-width:none;justify-content:space-between;gap:17px}.community-order{font-size:14px}.community-tools #resource-search{width:50%;flex:1;max-width:340px}.community-dialog{width:calc(100vw - 28px)}.community-dialog-head{padding:21px 23px 18px}#resource-upload-form{padding:23px;gap:21px}.community-dialog>.community-history{margin:0 23px 23px}}
@media(max-width:600px){.community-heading h1{font-size:25px}.community-heading h1>span{font-size:15px;margin-left:8px}.community-tools{gap:13px}.community-order{font-size:13px}.community-tools #resource-search{font-size:16px;height:42px;padding:10px 11px;max-width:none}#source-results .source-grid{gap:15px}#source-results .source-card{padding:21px;min-height:220px}#source-results .source-card-top{font-size:14px;gap:10px}#source-results .source-card h2{font-size:20px;line-height:1.5;margin-top:17px}#source-results .source-card>p{font-size:15px;line-height:1.85;margin-bottom:23px}#source-results .source-card-bottom{font-size:14px}.source-rank{font-size:13px;min-width:28px;height:28px}.resource-views{font-size:14px}.community-launcher{right:17px;bottom:81px;min-height:45px;padding:11px 15px;font-size:14px;border-radius:10px}.community-launcher svg{width:19px;height:19px}dialog.community-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 26px);border-radius:11px}.community-dialog-head{padding:20px 20px 17px;border-radius:11px 11px 0 0}.community-dialog-head h2{font-size:21px}.community-dialog-head>button{width:33px;height:33px;min-width:33px}#resource-upload-form{padding:21px 20px 23px;gap:20px}.community-tabs{width:100%;gap:3px}.community-tabs button{flex:1;padding:9px 12px;min-height:40px;font-size:14px}.community-pane>label:not(.community-dropzone),.community-dialog .field{font-size:15px}.community-dialog input:not([type=file]):not([type=checkbox]):not([type=radio]),.community-dialog textarea,.community-dialog select{font-size:16px;padding:11px 12px}.community-dialog textarea{min-height:180px;max-height:300px}.community-dropzone{padding:24px 16px;min-height:190px;gap:13px}.community-dropzone>strong{font-size:16px}.community-dropzone>span,.community-dropzone>p{font-size:14px}.community-dropzone input[type=file]{font-size:13px;width:100%}.community-dropzone input[type=file]::file-selector-button{font-size:14px;padding:8px 10px;margin-right:8px}.community-file{padding:10px 11px;gap:10px;font-size:14px}.community-file-list{max-height:210px}.community-settings{padding-top:16px}.community-settings>summary{font-size:14px}.community-progress,.community-error{font-size:14px;padding:11px 13px}.community-actions{align-items:stretch;flex-direction:column;gap:14px;padding-top:18px}.community-actions>span,.community-actions>p{font-size:14px;line-height:1.8}body:not(.auth-home) .community-actions .button.primary{width:100%;font-size:15px;min-height:46px;padding:11px 16px}.community-dialog>.community-history{margin:0 20px 23px}.community-history .clean-row{gap:10px}.community-history .clean-row>span:last-child{font-size:12px}}
@media(prefers-reduced-motion:reduce){.community-launcher,.community-dropzone,.community-tools #resource-search{transition:none}.community-launcher:hover{transform:none}}

body[data-page=opensource] main{padding-bottom:160px}.community-heading>div>span{display:block;margin-top:4px;color:#697991;font-size:14px}

.attachment-row{display:flex;gap:14px;flex-wrap:wrap;align-items:center;padding:16px 0;border-bottom:1px solid #dde4ed}.attachment-row strong{flex:1;overflow-wrap:anywhere;min-width:120px}.attachment-row code{display:block;width:100%;font-size:12px;overflow-wrap:anywhere;color:#62718b}.community-pending{margin:16px 0}.community-pending summary{cursor:pointer;margin-bottom:12px}
