.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}
.profile-info { display: flex; gap: 14px; align-items: center; }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-url { font-size: 13px; color: var(--text-sub); margin-top: 2px; }
.profile-url a { color: var(--primary); }

.view-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  gap: 12px;
}
.view-row:last-child { border-bottom: none; }
.view-row .label { width: 110px; flex-shrink: 0; color: var(--text-sub); font-weight: 600; }
.view-row .value { flex: 1; white-space: pre-line; }

.mode-actions { display: flex; gap: 8px; }
#editSection { display: none; }
#cnameEditSection { display: none; }

.readonly-value {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 14px;
  color: var(--text-sub);
}

/* 첨부 이미지 / HTML 미리보기 */
.empty-hint {
  color: var(--text-sub);
  font-size: 13px;
}
.portfolio-image {
  display: none;
  max-width: 220px;
  max-height: 220px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.portfolio-html-preview {
  display: none;
  width: 100%;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
/* pre-line이 마크업 줄바꿈을 빈 줄로 렌더링해 미리보기-버튼 간격과 버튼 영역 높이가 커지는 것을 방지.
   .view-row .value(pre-line) 규칙보다 우선하도록 선택자 구체성을 높임 */
.view-row .value.html-preview-value { white-space: normal; }
/* 조회 모드의 코드 복사 버튼 — 등록된 HTML이 없으면 JS가 숨긴다 */
.copy-actions { display: none; margin-top: 24px; }

/* 파일 첨부 입력 */
.field input[type="file"] {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 13px;
  color: var(--text-sub);
}
.field input[type="file"]::file-selector-button {
  padding: 7px 14px;
  margin-right: 10px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover {
  background: var(--primary-dark);
}
.file-preview { margin-top: 10px; }

/* 업로드한 HTML 파일 편집기
   style.css의 .field textarea(min-height:80px)보다 우선하도록 선택자 구체성을 높임 */
#htmlEditField { display: none; }
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
/* .field label의 margin-bottom을 editor-head가 대신 담당 */
.editor-head label { margin-bottom: 0; }
.field textarea.html-editor {
  width: 100%;
  min-height: 480px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-family: "SF Mono", "D2Coding", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  white-space: pre;
  overflow-x: auto;
}
.field textarea.html-editor:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.file-current {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-sub);
}
