.sp-gallery.sp-project-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.sp-order-card{cursor:grab}.sp-order-card:active{cursor:grabbing}
.sp-order-photo{position:relative;aspect-ratio:4/5;background:var(--surface-content)}
.sp-order-photo img{display:block;width:100%;height:100%;object-fit:cover}
.sp-order-card.is-dragging{opacity:.5}.sp-order-card.is-drop-target{outline:2px solid var(--action-blue,#00adee);outline-offset:-2px}
.sp-order-card .cta:disabled{opacity:.35;cursor:default}
.sp-gallery-placeholder{min-width:0;background:var(--surface-work);border-radius:var(--radius-content);overflow:hidden}
.sp-gallery-placeholder-photo{aspect-ratio:4/5;display:grid;place-items:center;background:var(--surface-content);padding:12px}
.sp-gallery-placeholder p{padding:12px;margin:0;color:var(--muted);font-size:12px;line-height:18px}
.sp-project-gallery .sp-post{padding:0;overflow:hidden;background:var(--surface-work);border-radius:var(--radius-content)}
.sp-gallery-media{position:relative}
.sp-project-gallery .sp-photo{display:block;width:100%;height:auto;aspect-ratio:4/5;padding:0;border:0;background:var(--surface-content);overflow:hidden;cursor:pointer}
.sp-project-gallery .sp-photo img{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:cover}
.sp-carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);width:32px;height:32px;border:0;border-radius:50%;background:#323439;color:white;display:grid;place-items:center;font-family:inherit;font-size:26px;line-height:1;font-weight:400;cursor:pointer;z-index:2}
.sp-carousel-arrow.is-prev{left:12px}.sp-carousel-arrow.is-next{right:12px}
.sp-carousel-arrow:hover{background:var(--action-blue,#00adee);color:white}.sp-carousel-arrow:focus-visible{outline:2px solid white;outline-offset:2px}
.sp-carousel-position{position:absolute;top:12px;right:12px;padding:4px 8px;border-radius:var(--radius-control);background:#323439;color:white;font-size:12px;line-height:18px;pointer-events:none}
.sp-gallery-identity{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:12px;row-gap:2px;align-items:center;padding:12px;width:100%;border:0;background:transparent;color:var(--text);text-align:left;font-family:inherit;box-sizing:border-box}
button.sp-gallery-identity{cursor:pointer}
.sp-gallery-avatar{grid-row:1/3;width:40px;height:40px;display:grid;place-items:center;border-radius:var(--radius-control);background:var(--surface-raised);overflow:hidden;font-size:14px;font-weight:500}
.sp-gallery-avatar img{width:100%;height:100%;object-fit:contain}
.sp-gallery-studio{font-size:14px;line-height:20px;font-weight:500;overflow-wrap:anywhere}
.sp-gallery-project{font-size:14px;line-height:20px;color:var(--muted);overflow-wrap:anywhere}
.sp-gallery-management{display:flex;gap:8px;align-items:center;padding:0 12px 12px;flex-wrap:wrap}
.sp-gallery-management>.cta{flex:1}
.sp-dialog .cta.sp-delete-post{color:#e5484d;background:transparent;border:1px solid #e5484d}
.sp-dialog .cta.sp-delete-post:hover,.sp-dialog .cta.sp-delete-post:focus-visible{background:#e5484d;color:#fff}
.sp-upload-photos{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:12px}
.sp-upload-photos>span:first-child{width:100%;font-size:14px;color:var(--muted)}
.sp-upload-photos>span:last-of-type{font-size:12px;color:var(--muted)}
.sp-photo-draft img{aspect-ratio:4/5}
.sp-post-crop-dialog{width:min(560px,calc(100vw - 24px))!important}
.sp-post-crop-preview{display:flex;justify-content:center;align-self:center;background:transparent;border-radius:var(--radius-content);overflow:hidden}
.sp-post-crop-preview canvas{display:block;width:auto;max-width:100%;height:auto;max-height:42vh;object-fit:contain;touch-action:none;cursor:grab}
.sp-post-crop-preview canvas:active{cursor:grabbing}
.sp-post-crop-dialog input[type=range]{padding:0;accent-color:var(--action-blue,#00adee);height:28px}
.sp-engagement{display:flex;align-items:center;gap:16px;color:var(--muted);font-size:12px;line-height:20px;flex-wrap:wrap}
.sp-post>.sp-engagement{padding:0 12px 12px}
.sp-comments{border-top:1px solid var(--surface-raised);padding-top:12px}
.sp-comments>.sp-engagement{margin-bottom:12px}
.sp-comment-thread{padding:12px 0}
.sp-comment{display:flex;gap:12px;align-items:start}
.sp-comment-avatar{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:10px;background:var(--surface-raised);color:var(--text);font-size:12px}
.sp-comment-body{min-width:0;flex:1}
.sp-comment-body strong{font-size:14px;font-weight:500}
.sp-comment-studio{margin-left:8px;font-size:12px;color:var(--action-blue,#00adee)}
.sp-comment-body time{display:block;font-size:11px;color:var(--muted);margin:4px 0 8px}
.sp-comment.is-reply{margin:12px 0 0 24px}
.sp-reply-form{margin:12px 0 0 24px;display:flex;flex-direction:column;gap:8px}
.sp-reply-form label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:var(--muted)}
.sp-reply-form>div{display:flex;justify-content:flex-end;gap:8px}
.sp-reply-form [role=alert]:empty{display:none}
.sp-gallery-management>[data-publish],.sp-gallery-management>[data-unpublish]{order:-1}
.sp-dialog.sp-gallery-dialog{width:min(1060px,calc(100vw - 48px));max-width:1060px;max-height:calc(100dvh - 48px)}
.sp-gallery-detail{display:grid;grid-template-columns:minmax(0,min(448px,calc((100dvh - 220px)*.8))) minmax(0,1fr);gap:12px;padding:0 12px 12px;overflow:auto;min-height:0}
.sp-gallery-detail-media{position:relative;width:100%;height:auto;aspect-ratio:4/5;min-width:0;align-self:start;background:var(--surface-content);border-radius:var(--radius-content);overflow:hidden}
.sp-gallery-detail-media>img{width:100%;height:100%;object-fit:cover;display:block;aspect-ratio:4/5}
.sp-gallery-detail-info{display:flex;flex-direction:column;gap:8px;min-height:0;min-width:0;height:min(560px,calc(100dvh - 220px));min-height:240px}
.sp-gallery-detail-info .sp-gallery-identity{padding:12px;border-radius:var(--radius-content);background:var(--surface-content)}
.sp-gallery-detail-scroll{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:8px;scrollbar-gutter:stable}
.sp-gallery-detail-scroll section{margin:0;padding:12px;border-radius:var(--radius-content);background:var(--surface-content)}
.sp-gallery-detail-scroll .sp-comments{border:0}
.sp-gallery-detail-scroll h3{font-size:14px;line-height:20px;font-weight:500;margin:0 0 8px}
.sp-gallery-detail-scroll p{font-size:14px;line-height:22px;margin:0;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}
.sp-gallery-hashtags{display:flex;flex-wrap:wrap;gap:8px;color:var(--text);font-size:14px;overflow-wrap:anywhere}
.sp-gallery-hashtags>span{padding:6px 10px;background:var(--surface-raised);border-radius:var(--radius-control)}
.sp-gallery-dialog .sp-engagement{gap:12px}
@media(max-width:1150px){.sp-gallery.sp-project-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.sp-gallery-detail{grid-template-columns:1fr}.sp-gallery-detail-media{height:auto;aspect-ratio:4/5}.sp-gallery-detail-info{height:auto;min-height:0;max-height:none}.sp-gallery-detail-scroll{overflow:visible;scrollbar-gutter:auto}.sp-dialog.sp-gallery-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}}
@media(max-width:520px){.sp-gallery.sp-project-gallery{grid-template-columns:1fr}}
