.avatar-editor-page { width: min(1080px, 94vw); height: min(760px, 92vh); }
.avatar-editor-content { overflow: hidden; }
.avatar-preview-section { min-width: 0; background: radial-gradient(circle at 50% 32%, #273440, #0d1217 72%); }
#avatar-preview-container { width: 100%; height: 100%; min-height: 420px; }
#avatarPreviewCanvas { width: 100%; height: 100%; display: block; touch-action: none; }
.avatar-controls-section { min-width: 360px; overflow: hidden; }
.clothing-editor-heading h3 { margin: 0 0 5px; font-size: 18px; }
.clothing-editor-heading p { margin: 0 0 14px; color: #9da8b2; line-height: 1.45; }
.clothing-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 8px; background: #151a1f; }
.clothing-tabs button { border: 0; border-radius: 6px; padding: 9px; color: #aeb8c1; background: transparent; cursor: pointer; }
.clothing-tabs button.active { color: white; background: #3178c6; }
.clothing-editor-status { min-height: 18px; padding: 10px 2px 7px; color: #9eabb6; font-size: 12px; }
.clothing-editor-status.error { color: #ff8585; }
.clothing-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 9px; padding: 2px; }
.clothing-card { position: relative; display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 7px; border: 1px solid #343e47; border-radius: 9px; color: #eef2f5; background: #242b31; text-align: left; cursor: pointer; }
.clothing-card:hover { border-color: #6686a2; }
.clothing-card.selected { border-color: #4ca1ff; box-shadow: 0 0 0 2px rgba(76,161,255,.25); }
.clothing-card.selected::after { content: "✓"; position: absolute; top: 11px; right: 11px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: #2187e8; font-weight: 800; }
.clothing-card img { width: 100%; aspect-ratio: 6 / 7; object-fit: cover; border-radius: 6px; background: #101418; }
.clothing-none > span:first-child { width: 100%; aspect-ratio: 6 / 7; display: grid; place-items: center; border-radius: 6px; color: #788691; background: #171c21; font-size: 34px; font-weight: 400; }
.clothing-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.clothing-card small { color: #9aa6af; }
.clothing-empty { grid-column: 1 / -1; padding: 28px 10px; color: #98a3ac; text-align: center; }
.clothing-more { margin: 8px auto 0; border: 1px solid #45515b; border-radius: 6px; padding: 7px 12px; color: #d8e0e6; background: #2b333a; cursor: pointer; }
.clothing-editor-actions { flex-direction: row; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.clothing-editor-actions button { border: 0; border-radius: 6px; padding: 10px 15px; color: white; background: #3a444d; cursor: pointer; }
.clothing-editor-actions button:disabled { opacity: .45; cursor: default; }
.clothing-editor-actions .save-btn { background: #1d9bf0; }
@media (max-width: 760px) {
  .avatar-editor-page { width: 100%; height: 100%; border-radius: 0; }
  .avatar-editor-content { flex-direction: column; overflow-y: auto; }
  .avatar-preview-section { min-height: 300px; flex: 0 0 38%; }
  #avatar-preview-container { min-height: 300px; }
  .avatar-controls-section { min-width: 0; flex: none; min-height: 420px; }
  .clothing-grid { grid-template-columns: repeat(3, minmax(90px, 1fr)); max-height: 390px; }
}
