/* Business implementation of the approved community prototype. */
.community-page,#community-dialog{--primary:#b54026;--muted:var(--text-secondary);--tint:#fbeee7;--green:var(--leaf-ink);--green-tint:var(--leaf-tint);--red:var(--danger);--page:#faf6ef}
.community-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.community-page h1,.community-page h2,.community-page p,#community-dialog h2,#community-dialog p{margin:0}
.community-page .space-heading h1{margin:9px 0 7px}
.community-page .share-body h2{margin:10px 0 7px}
.community-page .detail-heading h1{margin:10px 0}
.community-page button,#community-dialog button{font:inherit;cursor:pointer;border-radius:9px}
.community-page .primary,#community-dialog .primary{background:#b54026;border:1px solid #b54026;color:#fff;padding:9px 15px;border-radius:9px}
.community-page .secondary,#community-dialog .secondary{border:1px solid var(--line);background:#fff;color:var(--ink);padding:9px 15px;border-radius:9px}
.community-page input,.community-page select,#community-dialog input:not([type=checkbox]),#community-dialog select,#community-dialog textarea{display:block;width:100%;font:inherit;border:1px solid #d9cbbc;border-radius:9px;padding:10px 12px;background:#fff;color:var(--ink)}
.community-page .back-link{display:inline-block;margin-bottom:17px}
.space-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}
.space-heading h1{font-size:30px;margin:9px 0 7px}
.space-heading p{font-size:13px}
.space-visibility{display:inline-flex;align-items:center;gap:6px;color:var(--green);font-size:12px}
.space-heading>.primary{padding:11px 19px}
.space-heading .hint{margin-top:6px}
.space-toolbar{border:1px solid var(--line);border-radius:14px;background:#fff;padding:18px 20px;margin-bottom:23px}
.space-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin-bottom:17px}
.space-tabs button{border:0;background:transparent;padding:0 3px 12px;border-radius:0;color:var(--muted);font-weight:500;font-size:13px}
.space-tabs button[aria-pressed=true]{color:var(--primary);box-shadow:0 2px var(--primary);font-weight:600}
.space-tabs small{font-size:11px;margin-left:6px;opacity:.7}
.space-filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.space-search{display:flex;gap:8px;flex:1;min-width:250px}
.space-search input{font-size:12px;min-width:0;flex:1;width:auto!important}
.space-search button{flex:none;white-space:nowrap}
.space-filters select{width:145px;font-size:12px}
.space-filters button{font-size:12px}
.space-result-note{display:flex;justify-content:space-between;gap:12px;margin-bottom:13px;font-size:12px;color:var(--muted)}
.space-result-note>span:last-child{font-size:11px}
.share-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.share-card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;transition:box-shadow .15s,border-color .15s}
.share-card:hover{border-color:#d4c3ad;box-shadow:0 6px 22px #5c422010}
.share-cover{position:relative;display:flex;width:100%;height:232px;align-items:center;justify-content:center;gap:9px;padding:17px 25px;background:#f1eee4;border:0;border-radius:0;overflow:hidden}
.share-cover:hover{background:#ede9df;border-color:transparent}
.share-cover img{display:block;max-width:68%;height:100%;object-fit:contain;box-shadow:0 3px 10px #4c39281a;min-width:0}
.share-cover .cover-peek{width:27%;height:85%;object-fit:cover;object-position:left;margin-left:-2px;opacity:.85}
.share-count{position:absolute;bottom:11px;right:12px;font-size:10px;color:#625548;background:#fffcf1f0;border:1px solid #e2d9ca;padding:3px 8px;border-radius:6px}
.share-body{padding:18px 19px}
.share-tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.share-tags span{font-size:10px;font-weight:500;border-radius:5px;padding:2px 7px;background:var(--green-tint);color:var(--green)}
.share-tags span+span{background:#f4efe5;color:#807056}
.share-tags .withdrawn{background:#f1efec;color:#7f766c}
.share-body h2{font-size:16px;margin:10px 0 7px;line-height:1.65;overflow-wrap:anywhere}
.share-body>p{font-size:12px;line-height:1.85;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:44px}
.share-byline{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;font-size:11px;color:var(--muted)}
.share-byline>span:first-child{display:flex;align-items:center;gap:7px}
.mini-avatar{display:grid;place-items:center;width:23px;height:23px;background:var(--green-tint);color:var(--green);border-radius:50%;font-style:normal}
.share-card-actions{display:flex;align-items:center;gap:12px;border-top:1px solid var(--line);margin-top:14px;padding-top:13px}
.share-card-actions button{font-size:12px;padding:0;border:0;background:transparent;color:var(--primary);font-weight:500}
.share-card-actions button:first-child{margin-right:auto}
.share-card-actions button:hover{text-decoration:underline}
.share-card.is-withdrawn .share-cover{filter:grayscale(.6);opacity:.65}
.space-empty{grid-column:1/-1;padding:65px 20px;text-align:center;border:1px dashed #d6c9b8;border-radius:12px;background:#fffcf7}
.space-empty h2{font-size:18px;margin-bottom:9px}
.space-empty p{font-size:13px;margin-bottom:18px}
.space-empty button+button{margin-left:8px}
.back-link{padding-left:0!important;color:var(--primary)!important;font-size:12px;margin-bottom:17px}
.detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}
.detail-heading h1{font-size:26px;margin:10px 0;overflow-wrap:anywhere}
.detail-meta{display:flex;gap:12px;align-items:center;font-size:12px;color:var(--muted);flex-wrap:wrap}
.detail-heading .row{flex-shrink:0;padding-top:12px}
.detail-heading button{font-size:12px}
.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}
.detail-viewer{padding:20px;border-radius:14px;border:1px solid var(--line);background:#fff;min-width:0}
.detail-stage{display:flex;width:100%;height:540px;justify-content:center;align-items:center;border:0;border-radius:9px;background:var(--paper);padding:16px;cursor:zoom-in}
.detail-stage:hover{background:#f0ebe2}
.detail-stage img{display:block;max-width:100%;height:100%;object-fit:contain}
.detail-image-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;margin-top:12px;color:var(--muted)}
.detail-image-bar button{font-size:12px;padding:5px 8px}
.detail-thumbs{display:flex;gap:9px;margin-top:17px;flex-wrap:wrap}
.detail-thumbs button{padding:5px;background:#fff;width:61px;height:75px;border-radius:7px}
.detail-thumbs button[aria-pressed=true]{border-color:var(--primary);background:var(--tint);box-shadow:0 0 0 1px var(--primary)}
.detail-thumbs img{display:block;width:100%;height:100%;object-fit:contain}
.detail-side{border:1px solid var(--line);border-radius:14px;padding:23px;background:#fff}
.detail-side h2{font-size:15px;margin-bottom:13px}
.detail-side>p{white-space:pre-wrap;font-size:12px;line-height:1.95;overflow-wrap:anywhere}
.detail-side dl{margin:19px 0;font-size:12px;border-block:1px solid var(--line);padding:13px 0}
.detail-side dl>div{display:flex;gap:10px;justify-content:space-between;padding:5px 0}
.detail-side dt{color:var(--muted)}
.detail-side dd{margin:0;text-align:right}
.detail-downloads{display:grid;gap:9px}
.detail-downloads button{font-size:13px}
.detail-side .download-note{font-size:11px;text-align:center;margin-top:10px;color:var(--green)}
.detail-side .snapshot-note{font-size:11px;color:var(--muted);margin-top:21px;border-top:1px solid var(--line);padding-top:14px}
.withdraw-banner{border:1px solid #e3d8c8;background:#f4eee4;padding:13px 17px;border-radius:10px;font-size:12px;color:#7e6b53;margin-bottom:19px}
#community-dialog{width:min(790px,calc(100vw - 32px));padding:0;max-height:92svh;background:#fffdf9}
#community-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
.modal-heading,.modal-footer{flex:none}
.modal-heading{padding:23px 26px 17px;display:flex;justify-content:space-between;gap:15px;align-items:flex-start;border-bottom:1px solid var(--line)}
.modal-heading h2{margin:0;font-size:21px}
.modal-heading p{font-size:12px;margin:5px 0 0}
.modal-heading button{font-size:23px;padding:0;width:31px;height:31px;border-color:transparent;background:transparent;color:var(--muted);line-height:1}
.modal-content{padding:22px 26px;overflow-y:auto;min-height:0}
.share-steps{display:flex;align-items:center;justify-content:center;gap:20px;background:#f5f1e9;font-size:12px;padding:11px;color:var(--muted);border-radius:8px;margin-bottom:22px}
.share-steps span{display:flex;align-items:center;gap:8px}
.share-steps b{display:grid;place-items:center;font-weight:500;border:1px solid #d2c6b6;border-radius:50%;width:22px;height:22px;font-size:11px}
.share-steps [aria-current=step]{color:var(--primary);font-weight:600}
.share-steps [aria-current=step] b{background:var(--primary);color:#fff;border-color:var(--primary)}
.share-steps i{height:1px;width:55px;background:#d8cebf}
.picker-project{margin-bottom:17px}
.picker-project select{font-size:13px}
.picker-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px;font-size:12px;color:var(--muted)}
.picker-toolbar button{font-size:12px}
.output-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.output-choice{position:relative;min-width:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff;cursor:pointer}
.output-choice:has(:checked){border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
.output-choice input{position:absolute;top:10px;left:10px;z-index:1;box-shadow:0 0 0 4px #ffffffed;border-radius:2px}
.output-choice img{display:block;width:100%;height:183px;object-fit:contain;background:var(--paper);padding:9px}
.output-choice .locked-output{height:183px;display:grid;place-items:center;background:#f2f0eb;font-size:12px;color:#968675}
.output-choice .choice-copy{display:block;padding:10px 11px}
.output-choice strong{display:block;font-size:12px;line-height:1.7;font-weight:500}
.output-choice small{font-size:10px;color:var(--green)}
.output-choice.is-locked{cursor:default;opacity:.7}
.output-choice.is-locked small{color:var(--muted)}
.share-scope-note{font-size:11px!important;line-height:1.9!important;margin:16px 0 0!important;color:var(--muted)}
.modal-footer{padding:17px 26px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fffdf9}
.modal-footer>span{font-size:12px;color:var(--muted)}
.modal-footer button{font-size:12px}
.modal-footer .row{justify-content:flex-end}
.share-form-layout{display:grid;grid-template-columns:176px minmax(0,1fr);gap:25px}
.share-summary{background:#f5f0e7;border:1px solid var(--line);border-radius:10px;padding:12px;align-self:start}
.share-summary>img{width:100%;height:202px;object-fit:contain}
.share-summary strong{display:block;font-size:12px;margin:9px 0 3px}
.share-summary p{font-size:11px;margin:0}
.summary-thumbs{display:flex;gap:6px;margin-top:12px}
.summary-thumbs img{width:38px;height:48px;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:4px;padding:2px}
.share-fields{display:grid;gap:16px;align-content:start}
.share-fields .field{font-size:12px}
.share-fields input,.share-fields select,.share-fields textarea{font-size:12px}
.share-fields textarea{min-height:108px}
.share-field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.publish-scope{padding:12px 14px;border:1px solid #dce3d4;background:#f1f5ed;border-radius:9px;margin-top:17px;font-size:11px;color:#5a6c4c;line-height:1.9}
.publish-scope strong{display:block;font-size:12px;color:var(--green)}
.form-error{color:var(--red);font-size:12px;margin:9px 0 0;min-height:0}

.community-row.community-confirm-actions{justify-content:flex-end;margin-top:20px}
.community-error{color:var(--danger);font-size:12px;margin-top:12px!important}
.community-field{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:600}
.community-field small{font-size:11px;font-weight:400;color:var(--muted)}
.community-field textarea{min-height:108px;line-height:1.85;resize:vertical}
#community-dialog{margin:auto;border:1px solid var(--line);border-radius:17px;box-shadow:0 18px 80px #2f21162b;color:var(--ink)}
#community-dialog::backdrop{background:#2b241b66}
#community-dialog .modal-footer{margin:0;flex-direction:row}
#community-dialog .modal-footer>.community-row{justify-content:flex-end}
#community-dialog .modal-heading p{margin-top:5px}
#community-dialog .modal-heading button{padding:0;background:transparent;color:var(--muted);border-color:transparent;font-size:23px;width:31px;height:31px}
#community-dialog .output-choice input{width:16px;height:16px;accent-color:#b54026}
#community-dialog .choice-copy strong{font-size:12px;font-weight:500}
#community-dialog .modal-footer button{font-size:12px}
.share-status{display:inline-block;font-size:10px;border-radius:5px;background:var(--leaf-tint);color:var(--leaf-ink);padding:2px 7px;margin-top:8px}
.share-status.withdrawn{background:#f1efec;color:#7f766c}
.share-card-actions>a{margin-right:auto;color:#b54026;font-size:12px;font-weight:500}
.share-card-actions a:hover{text-decoration:underline}
.detail-downloads>a{display:block;text-align:center;border-radius:9px;font-size:13px}
.community-pagination{display:flex;align-items:center;justify-content:center;gap:15px;margin-top:24px;font-size:12px}
.community-lightbox{display:block;max-width:100%;height:65svh;object-fit:contain;margin:16px auto 0;background:var(--paper)}
.community-result-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.community-result-tools p{margin:0}
.community-result-tools button{font-size:12px;white-space:nowrap}
.home-community-entry{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid var(--leaf-line);background:var(--leaf-tint);border-radius:12px;padding:24px;margin-top:24px}
.home-community-entry h2{font-size:18px;color:var(--leaf-ink);margin:0 0 6px}
.home-community-entry p{font-size:12px;margin:0;color:var(--text-secondary)}
.home-community-entry>span{color:var(--leaf-ink);font-size:13px;white-space:nowrap}
@media(min-width:1500px){.share-cover{height:260px}}
@media(max-width:1000px){.share-cover{height:205px;padding-inline:15px}.detail-layout{grid-template-columns:minmax(0,1fr) 265px}.detail-stage{height:450px}}
@media(max-width:800px){.share-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.space-heading h1{font-size:27px}.detail-layout{grid-template-columns:minmax(0,1fr)}.detail-side{padding:20px}.detail-downloads{grid-template-columns:1fr 1fr}.detail-side dl{display:flex;gap:25px;flex-wrap:wrap}.detail-side dl>div{gap:10px}.detail-stage{height:520px}.share-cover{height:240px}.space-filters select{flex:1;min-width:120px}.space-search{flex-basis:100%}.space-heading{align-items:flex-start}.detail-heading h1{font-size:23px}.detail-heading{flex-wrap:wrap}.detail-heading .row{padding-top:0}}
@media(max-width:560px){.space-heading{flex-wrap:wrap;gap:16px}.space-heading h1{font-size:26px}.space-heading p{font-size:12px}.space-heading>.primary{font-size:12px;padding:9px 15px}.space-toolbar{padding:15px}.space-result-note>span:last-child{display:none}.share-grid{grid-template-columns:1fr;gap:17px}.share-cover{height:280px}.share-body{padding:18px}.share-body>p{min-height:0}.space-tabs{gap:23px}.space-filters select{width:100px}.detail-stage{height:425px;padding:9px}.detail-viewer{padding:13px}.detail-downloads{grid-template-columns:1fr}.detail-meta{font-size:11px}.share-form-layout{grid-template-columns:1fr;gap:17px}.share-summary{display:flex;gap:12px;align-items:center}.share-summary>img{width:51px;height:68px}.share-summary strong{margin-top:0}.share-summary .summary-thumbs{display:none}.modal-heading{padding:18px}.modal-content{padding:18px}.modal-footer{padding:15px 18px}.output-picker{gap:8px}.output-choice img,.output-choice .locked-output{height:130px}.output-choice .choice-copy{padding:8px}.output-choice strong{font-size:11px}.output-choice input{left:8px;top:8px}.share-steps{gap:10px}.share-steps i{width:24px}.share-steps span{gap:5px}.home-community-entry{align-items:flex-start;flex-direction:column}}
