#player-avatar{padding:0;overflow:hidden;cursor:zoom-in;flex-shrink:0}#player-avatar.has-photo{border-radius:50%}.player-avatar img,.profile-photo-expanded img{display:block;width:100%;height:100%;object-fit:cover}.profile-photo-expanded{display:grid;place-items:center;width:min(260px,100%);aspect-ratio:1;margin:24px auto;background:#e6ebdd;border:1px solid var(--line);border-radius:50%;font:500 80px 'Space Grotesk',sans-serif;overflow:hidden}.profile-photo-expanded[hidden]{display:none}#profile-photo-view h2{font:500 24px/1.2 'Space Grotesk',sans-serif;letter-spacing:-.7px;overflow-wrap:anywhere}#profile-photo-view h3{font-size:12px;margin:24px 0 12px}#profile-photo-actions{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}.photo-edit-button{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:12px}.photo-edit-button svg{width:17px;height:17px}#dialog .photo-upload{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px;border:1px solid var(--line);border-radius:6px;cursor:pointer;font-size:12px;margin-top:20px}.photo-upload:has(+input:focus-visible){outline:2px solid #9f945a;outline-offset:2px}.photo-upload svg{width:17px;height:17px}#profile-photo-view .photo-help{font-size:11px;color:var(--muted);line-height:1.5;margin:10px 0}.photo-crop-stage{width:100%;aspect-ratio:1;position:relative;overflow:hidden;margin-top:16px;background:#eee;border-radius:8px}.photo-crop-stage canvas{position:absolute;inset:0;width:100%;height:100%;cursor:grab;touch-action:none}.photo-crop-stage canvas:active{cursor:grabbing}.photo-crop-mask{position:absolute;inset:0;pointer-events:none;border-radius:50%;box-shadow:0 0 0 100px #24272480;border:1px solid #ffffffba}.photo-zoom{display:flex;gap:10px;align-items:center}.photo-zoom input{flex:1;min-width:0;padding:0;accent-color:#65784d}.photo-zoom button{width:40px;height:40px}#photo-reset{min-height:36px}#profile-photo-error:empty,#profile-photo-status:empty{display:none}#profile-photo-view .avatar-presets{display:flex;flex-wrap:wrap;gap:10px}#profile-photo-view .avatar-presets .player-avatar{width:44px;height:44px;min-height:44px;font-size:23px;margin:0}#profile-photo-view .paint{font-size:12px}

.group-photo-open{padding:0;line-height:0;cursor:zoom-in;flex-shrink:0;min-width:64px;min-height:64px}#group-detail .group-profile-head>.group-photo-open{flex:none}.group-photo-view .profile-photo-expanded{border-radius:14px}.group-photo-view .photo-crop-mask{border-radius:14px}.group-photo-view .profile-photo-expanded>.group-icon{width:100%;height:100%;object-fit:contain}.group-photo-view .group-icon-choice{min-height:44px;padding:4px}.group-photo-view .group-icon-choice img{width:36px;height:36px}.photo-edit-button{font-family:inherit}
.photo-source-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}#dialog .photo-source-actions .photo-upload{flex:1;min-width:130px;min-height:44px;margin:0;font:400 11px 'DM Sans',sans-serif}.photo-source-actions:has(+input:focus-visible) label{outline:2px solid #9f945a;outline-offset:2px}.photo-crop-tools{display:flex;justify-content:space-between;gap:12px}.photo-crop-tools button{min-height:40px}.photo-zoom output{font-size:10px;min-width:36px;text-align:right;font-variant-numeric:tabular-nums}#photo-attempt-reference{overflow-wrap:anywhere;font-size:10px;color:var(--muted)}#photo-attempt-reference:empty,#photo-retry:empty{display:none}.photo-dev-search{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.photo-dev-search input{flex:1 1 100%}#dialog .photo-dev-search select{width:auto;flex:1;min-width:0;margin:0;font:400 11px 'DM Sans',sans-serif;min-height:40px}.photo-dev-search button{min-height:40px}#photo-dev h2,#photo-dev-detail h2{font:500 24px/1.2 'Space Grotesk',sans-serif;letter-spacing:-.7px}#photo-dev .photo-help,#photo-dev-detail .photo-help{font-size:11px;color:var(--muted)}.photo-dev-row{display:grid;grid-template-columns:54px minmax(0,1fr) 12px;gap:12px;width:100%;text-align:left;align-items:center;border-top:1px solid var(--line);padding:13px 0}.photo-dev-thumb{display:grid;place-items:center;width:54px;height:54px;border-radius:6px;overflow:hidden;background:#e9ecdf;color:var(--muted)}.photo-dev-thumb img{width:100%;height:100%;object-fit:cover}.photo-dev-row-body{display:flex;flex-direction:column;gap:4px;min-width:0}.photo-dev-row strong{font-size:12px;font-weight:500;overflow-wrap:anywhere}.photo-dev-row small{font-size:10px;color:var(--muted);overflow-wrap:anywhere}.photo-dev-state{font-size:10px;color:#686e61}.photo-dev-state.state-error,.photo-dev-state.state-rejected{color:#a33d3a}.photo-dev-state.state-approved{color:#536b40}#photo-dev-more{width:100%;min-height:44px}#photo-dev-error:empty,#photo-dev-detail-error:empty{display:none}#photo-dev-preview{margin:20px 0}#photo-dev-preview img{display:block;width:min(280px,100%);margin:auto;border-radius:8px}#photo-dev-decision{font-size:12px;line-height:1.6}.photo-dev-fact{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:12px;border-bottom:1px solid var(--line);padding:9px 0;font-size:11px;line-height:1.5}.photo-dev-fact dt{color:var(--muted)}.photo-dev-fact dd{margin:0;overflow-wrap:anywhere}.photo-dev-score{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:8px 0;font-size:11px}.photo-dev-score strong{font-weight:500;white-space:nowrap}#photo-dev-detail h3{font-size:14px;margin-top:24px}.photo-dev-technical summary{font-size:12px;cursor:pointer;padding:12px 0}.photo-dev-technical pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:10px;line-height:1.6;background:#e9ecdf;padding:12px;border-radius:6px;margin:0}#photo-dev-list{margin-top:16px}
.photo-feedback:has(.form-error:not(:empty)){border-left:2px solid #b73340;padding-left:10px;margin:14px 0}.photo-feedback .form-error{font-size:11px;line-height:1.6;margin:8px 0}.photo-feedback>.quiet{font-size:11px;min-height:36px;padding:0}.photo-feedback>p:empty{display:none}

/* Keep the primary action available while the crop editor scrolls. */
#dialog:has(#profile-photo-view){padding:0;scroll-padding-top:76px}
#dialog:has(#profile-photo-view) #dialog-content{padding:0}
#dialog:has(#profile-photo-view)>form{position:sticky;top:0;z-index:5;height:0;margin:0}
#dialog:has(#profile-photo-view) .close{position:absolute;right:10px;top:12px;float:none;width:36px;height:40px}
#dialog:has(#profile-photo-view) .dialog-nav-back{z-index:6}
#profile-photo-view{padding:0 24px 24px}
.photo-editor-toolbar{position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:66px;margin:0 -24px 18px;padding:12px 54px 12px 24px;background:var(--paper);border-bottom:1px solid var(--line)}
#dialog.has-parent .photo-editor-toolbar{padding-left:56px}
.photo-editor-toolbar>span{font-size:11px;color:var(--muted)}
#dialog .photo-editor-toolbar .paint{width:auto;margin:0;min-height:40px;padding:10px 14px;font-size:12px;white-space:nowrap}
#profile-photo-view .photo-crop-tools{gap:8px;margin-top:10px;flex-wrap:wrap}
#profile-photo-view .photo-crop-tools button,.photo-edit-button,#profile-photo-actions>.quiet{border:1px solid var(--line);border-radius:6px;background:#faf9f5;min-height:40px;padding:9px 12px;color:var(--ink);font-size:11px}
#profile-photo-view .photo-crop-tools button:hover,.photo-edit-button:hover,#profile-photo-actions>.quiet:hover{background:#e9ecdf;border-color:#bec8ae}
.photo-progress{width:min(360px,calc(100vw - 32px));padding:28px 24px;text-align:center;border:1px solid var(--line);background:var(--paper);border-radius:12px;box-shadow:0 16px 60px #17201925}
.photo-progress::backdrop{background:#17201955;backdrop-filter:blur(7px)}
.photo-progress h2{font:500 22px/1.3 'Space Grotesk',sans-serif;letter-spacing:-.5px;margin:16px 0 12px}
.photo-progress-icon{display:grid;place-items:center;width:48px;height:48px;margin:auto;border-radius:50%;background:#e9ecdf;color:#536b40}
.photo-progress-icon svg{width:25px;height:25px;stroke-width:2}
.photo-progress[data-state=error] .photo-progress-icon{background:#f5e3e4;color:#b73340}
.photo-spinner{width:26px;height:26px;border:2px solid #c7cfbc;border-top-color:#536b40;border-radius:50%;animation:photo-spin .8s linear infinite}
@keyframes photo-spin{to{transform:rotate(360deg)}}
.photo-progress .photo-feedback{border:0;margin:0;padding:0;text-align:center}
.photo-progress p{font-size:12px;line-height:1.6;margin:10px 0;overflow-wrap:anywhere}
.photo-progress #photo-attempt-reference{font-size:10px;color:var(--muted)}
.photo-progress .photo-feedback>.quiet{display:block;margin:10px auto;border-bottom:1px solid #9da98e;min-height:36px;padding:5px;color:var(--ink)}
.photo-progress-return{border:1px solid #bdc7b1;border-radius:6px;padding:10px 16px;min-height:44px;margin-top:14px;background:#e9ecdf;font-size:12px}
@media(prefers-reduced-motion:reduce){.photo-spinner{animation-duration:2s}}

.photo-progress .photo-feedback:has(.form-error:not(:empty)){border:0;margin:0;padding:0}
